@agimon-ai/doompi-git 0.0.1-alpha.6 → 0.0.1-alpha.8
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/controllers/gitSession.cjs +1 -1
- package/dist/controllers/gitSession.cjs.map +1 -1
- package/dist/controllers/gitSession.mjs +1 -1
- package/dist/controllers/gitSession.mjs.map +1 -1
- package/dist/extensions/pi.d.cts +2 -2
- package/dist/extensions/pi.d.cts.map +1 -1
- package/dist/extensions/pi.d.mts +2 -2
- package/dist/extensions/pi.d.mts.map +1 -1
- package/dist/extensions/server.d.cts +2 -2
- package/dist/extensions/server.d.cts.map +1 -1
- package/dist/extensions/server.d.mts +2 -2
- package/dist/extensions/server.d.mts.map +1 -1
- package/dist/schemas/apiContracts.d.cts +2 -2
- package/dist/schemas/apiContracts.d.cts.map +1 -1
- package/dist/schemas/apiContracts.d.mts +2 -2
- package/dist/schemas/apiContracts.d.mts.map +1 -1
- package/dist/schemas/runWorktreeTool.cjs +1 -1
- package/dist/schemas/runWorktreeTool.cjs.map +1 -1
- package/dist/schemas/runWorktreeTool.mjs +1 -1
- package/dist/schemas/runWorktreeTool.mjs.map +1 -1
- package/dist/services/extensionService/index.d.cts +1 -2
- package/dist/services/extensionService/index.d.cts.map +1 -1
- package/dist/services/extensionService/index.d.mts +1 -2
- package/dist/services/extensionService/index.d.mts.map +1 -1
- package/dist/services/gitDependencies/index.d.cts +1 -2
- package/dist/services/gitDependencies/index.d.cts.map +1 -1
- package/dist/services/gitDependencies/index.d.mts +1 -2
- package/dist/services/gitDependencies/index.d.mts.map +1 -1
- package/dist/services/worktreeEvents/index.d.cts +3 -4
- package/dist/services/worktreeEvents/index.d.cts.map +1 -1
- package/dist/services/worktreeEvents/index.d.mts +3 -4
- package/dist/services/worktreeEvents/index.d.mts.map +1 -1
- package/dist/services/worktreeNaming/index.d.cts +2 -3
- package/dist/services/worktreeNaming/index.d.cts.map +1 -1
- package/dist/services/worktreeNaming/index.d.mts +2 -3
- package/dist/services/worktreeNaming/index.d.mts.map +1 -1
- package/dist/services/worktreeOperations/index.d.cts +4 -5
- package/dist/services/worktreeOperations/index.d.cts.map +1 -1
- package/dist/services/worktreeOperations/index.d.mts +4 -5
- package/dist/services/worktreeOperations/index.d.mts.map +1 -1
- package/dist/tools/runWorktree.cjs +1 -1
- package/dist/tools/runWorktree.cjs.map +1 -1
- package/dist/tools/runWorktree.mjs +1 -1
- package/dist/tools/runWorktree.mjs.map +1 -1
- package/dist/types/extension.d.cts +4 -5
- package/dist/types/extension.d.cts.map +1 -1
- package/dist/types/extension.d.mts +4 -5
- package/dist/types/extension.d.mts.map +1 -1
- package/dist/types/worktreeRegistry.d.cts +3 -4
- package/dist/types/worktreeRegistry.d.cts.map +1 -1
- package/dist/types/worktreeRegistry.d.mts +3 -4
- package/dist/types/worktreeRegistry.d.mts.map +1 -1
- package/package.json +11 -11
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../services/gitCli/index.cjs"),t=require("../services/worktreeEvents/index.cjs"),n=require("../services/worktreeOperations/index.cjs"),r=require("../schemas/runWorktreeTool.cjs"),i=require("../services/runWorktree/index.cjs");let a=require("node:fs/promises");const o=new URL(`../../`,require("url").pathToFileURL(__filename).href);async function s(e){try{return await(0,a.readFile)(new URL(e,o),`utf8`)}catch{return`(resource unavailable: ${e})`}}function c(e,t){return{content:[{type:`text`,text:t}],details:{action:e}}}function l({host:a}){if(a.context.directEvents===void 0)throw Error(`Git headless facet requires the session direct event bus.`);if(a.context.sessionId===void 0)throw Error(`Git headless facet requires a session identity.`);let o=a.context.sessionId,l=a.context.directEvents,u=t.createWorktreeMessageInbox(l,o),d=n.createWorktreeOperations({git:e.createWorktreeGit(),sessionService:a.context.sessionService,messageInbox:u});return{resources:[{name:`doompi-git`,kind:`context`,read:()=>s(`llms.txt`)},{name:`doompi-use-git`,kind:`skill`,read:()=>s(`src/prompts/doompi-use-git/SKILL.md`)},{name:`doompi-git-readme`,kind:`context`,read:()=>s(`README.md`)}],tools:[{name:i.RUN_WORKTREE_TOOL_NAME,label:`Worktree`,description:i.RUN_WORKTREE_DESCRIPTION,parameters:r.
|
|
1
|
+
const e=require("../services/gitCli/index.cjs"),t=require("../services/worktreeEvents/index.cjs"),n=require("../services/worktreeOperations/index.cjs"),r=require("../schemas/runWorktreeTool.cjs"),i=require("../services/runWorktree/index.cjs");let a=require("node:fs/promises");const o=new URL(`../../`,require("url").pathToFileURL(__filename).href);async function s(e){try{return await(0,a.readFile)(new URL(e,o),`utf8`)}catch{return`(resource unavailable: ${e})`}}function c(e,t){return{content:[{type:`text`,text:t}],details:{action:e}}}function l({host:a}){if(a.context.directEvents===void 0)throw Error(`Git headless facet requires the session direct event bus.`);if(a.context.sessionId===void 0)throw Error(`Git headless facet requires a session identity.`);let o=a.context.sessionId,l=a.context.directEvents,u=t.createWorktreeMessageInbox(l,o),d=n.createWorktreeOperations({git:e.createWorktreeGit(),sessionService:a.context.sessionService,messageInbox:u});return{resources:[{name:`doompi-git`,kind:`context`,read:()=>s(`llms.txt`)},{name:`doompi-use-git`,kind:`skill`,read:()=>s(`src/prompts/doompi-use-git/SKILL.md`)},{name:`doompi-git-readme`,kind:`context`,read:()=>s(`README.md`)}],tools:[{name:i.RUN_WORKTREE_TOOL_NAME,label:`Worktree`,description:i.RUN_WORKTREE_DESCRIPTION,parameters:r.RunWorktreeToolSchema,promptSnippet:`Create and manage Git worktree sessions`,executionMode:`serial`,async execute(e,t,n,r,a){let o=i.validateParams(t);return i.executeRunWorktreeTool(o,d,a,{...n===void 0?{}:{signal:n},onProgress:e=>r?.(c(o.action,e))})}}],onDispose:()=>u.close()}}exports.createGitSession=l;
|
|
2
2
|
//# sourceMappingURL=gitSession.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitSession.cjs","names":["readFile","createWorktreeMessageInbox","createWorktreeOperations","createWorktreeGit","RUN_WORKTREE_TOOL_NAME","RUN_WORKTREE_DESCRIPTION","
|
|
1
|
+
{"version":3,"file":"gitSession.cjs","names":["readFile","createWorktreeMessageInbox","createWorktreeOperations","createWorktreeGit","RUN_WORKTREE_TOOL_NAME","RUN_WORKTREE_DESCRIPTION","RunWorktreeToolSchema","validateParams","executeRunWorktreeTool"],"sources":["../../src/controllers/gitSession.ts"],"sourcesContent":["import { readFile } from 'node:fs/promises';\n\nimport {\n type DoomHeadlessResource,\n type DoomHeadlessTool,\n type DoomHeadlessToolResult,\n} from '@agimon-ai/doompi-core/headless';\nimport type { DoomServerPluginContext, DoomServerSessionPlugin } from '@agimon-ai/doompi-core/server-facet';\n\nimport { RunWorktreeToolSchema, type RunWorktreeToolParams } from '../schemas/runWorktreeTool';\nimport { createWorktreeGit } from '../services/gitCli';\nimport {\n executeRunWorktreeTool,\n RUN_WORKTREE_DESCRIPTION,\n RUN_WORKTREE_TOOL_NAME,\n validateParams,\n} from '../services/runWorktree';\nimport { createWorktreeMessageInbox } from '../services/worktreeEvents';\nimport { createWorktreeOperations } from '../services/worktreeOperations';\n\nconst PACKAGE_ROOT = new URL('../../', import.meta.url);\n\nasync function readPackageResource(name: string): Promise<string> {\n try {\n return await readFile(new URL(name, PACKAGE_ROOT), 'utf8');\n } catch {\n return `(resource unavailable: ${name})`;\n }\n}\n\nfunction progressResult(action: RunWorktreeToolParams['action'], label: string): DoomHeadlessToolResult {\n return { content: [{ type: 'text', text: label }], details: { action } };\n}\n\nexport function createGitSession({ host: serverHost }: DoomServerPluginContext): DoomServerSessionPlugin {\n if (serverHost.context.directEvents === undefined)\n throw new Error('Git headless facet requires the session direct event bus.');\n if (serverHost.context.sessionId === undefined) throw new Error('Git headless facet requires a session identity.');\n const sessionId = serverHost.context.sessionId;\n const directEvents = serverHost.context.directEvents;\n const messageInbox = createWorktreeMessageInbox(directEvents, sessionId);\n const operations = createWorktreeOperations({\n git: createWorktreeGit(),\n sessionService: serverHost.context.sessionService,\n messageInbox,\n });\n const resources: DoomHeadlessResource[] = [\n { name: 'doompi-git', kind: 'context', read: () => readPackageResource('llms.txt') },\n {\n name: 'doompi-use-git',\n kind: 'skill',\n read: () => readPackageResource('src/prompts/doompi-use-git/SKILL.md'),\n },\n { name: 'doompi-git-readme', kind: 'context', read: () => readPackageResource('README.md') },\n ];\n\n const tool: DoomHeadlessTool<typeof RunWorktreeToolSchema> = {\n name: RUN_WORKTREE_TOOL_NAME,\n label: 'Worktree',\n description: RUN_WORKTREE_DESCRIPTION,\n parameters: RunWorktreeToolSchema,\n promptSnippet: 'Create and manage Git worktree sessions',\n executionMode: 'serial',\n async execute(_toolCallId, parameters, signal, onUpdate, execution) {\n const params = validateParams(parameters) as RunWorktreeToolParams;\n return executeRunWorktreeTool(params, operations, execution, {\n ...(signal === undefined ? {} : { signal }),\n onProgress: (label) => onUpdate?.(progressResult(params.action, label)),\n });\n },\n };\n return { resources, tools: [tool], onDispose: () => messageInbox.close() };\n}\n"],"mappings":"qRAoBA,MAAM,EAAe,IAAI,IAAI,SAAA,QAAA,KAAA,CAAA,CAAA,cAAA,UAAA,CAAA,CAAA,IAAyB,EAEtD,eAAe,EAAoB,EAA+B,CAChE,GAAI,CACF,OAAO,MAAA,EAAMA,EAAAA,SAAAA,CAAS,IAAI,IAAI,EAAM,CAAY,EAAG,MAAM,CAC3D,MAAQ,CACN,MAAO,0BAA0B,EAAK,EACxC,CACF,CAEA,SAAS,EAAe,EAAyC,EAAuC,CACtG,MAAO,CAAE,QAAS,CAAC,CAAE,KAAM,OAAQ,KAAM,CAAM,CAAC,EAAG,QAAS,CAAE,QAAO,CAAE,CACzE,CAEA,SAAgB,EAAiB,CAAE,KAAM,GAAgE,CACvG,GAAI,EAAW,QAAQ,eAAiB,IAAA,GACtC,MAAU,MAAM,2DAA2D,EAC7E,GAAI,EAAW,QAAQ,YAAc,IAAA,GAAW,MAAU,MAAM,iDAAiD,EACjH,IAAM,EAAY,EAAW,QAAQ,UAC/B,EAAe,EAAW,QAAQ,aAClC,EAAeC,EAAAA,2BAA2B,EAAc,CAAS,EACjE,EAAaC,EAAAA,yBAAyB,CAC1C,IAAKC,EAAAA,kBAAkB,EACvB,eAAgB,EAAW,QAAQ,eACnC,cACF,CAAC,EA0BD,MAAO,CAAE,UAAA,CAxBP,CAAE,KAAM,aAAc,KAAM,UAAW,SAAY,EAAoB,UAAU,CAAE,EACnF,CACE,KAAM,iBACN,KAAM,QACN,SAAY,EAAoB,qCAAqC,CACvE,EACA,CAAE,KAAM,oBAAqB,KAAM,UAAW,SAAY,EAAoB,WAAW,CAAE,CAkB5E,EAAG,MAAO,CAAC,CAd1B,KAAMC,EAAAA,uBACN,MAAO,WACP,YAAaC,EAAAA,yBACb,WAAYC,EAAAA,sBACZ,cAAe,0CACf,cAAe,SACf,MAAM,QAAQ,EAAa,EAAY,EAAQ,EAAU,EAAW,CAClE,IAAM,EAASC,EAAAA,eAAe,CAAU,EACxC,OAAOC,EAAAA,uBAAuB,EAAQ,EAAY,EAAW,CAC3D,GAAI,IAAW,IAAA,GAAY,CAAC,EAAI,CAAE,QAAO,EACzC,WAAa,GAAU,IAAW,EAAe,EAAO,OAAQ,CAAK,CAAC,CACxE,CAAC,CACH,CAE6B,CAAC,EAAG,cAAiB,EAAa,MAAM,CAAE,CAC3E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createWorktreeGit as e}from"../services/gitCli/index.mjs";import{createWorktreeMessageInbox as t}from"../services/worktreeEvents/index.mjs";import{createWorktreeOperations as n}from"../services/worktreeOperations/index.mjs";import{
|
|
1
|
+
import{createWorktreeGit as e}from"../services/gitCli/index.mjs";import{createWorktreeMessageInbox as t}from"../services/worktreeEvents/index.mjs";import{createWorktreeOperations as n}from"../services/worktreeOperations/index.mjs";import{RunWorktreeToolSchema as r}from"../schemas/runWorktreeTool.mjs";import{RUN_WORKTREE_DESCRIPTION as i,RUN_WORKTREE_TOOL_NAME as a,executeRunWorktreeTool as o,validateParams as s}from"../services/runWorktree/index.mjs";import{readFile as c}from"node:fs/promises";const l=new URL(`../../`,import.meta.url);async function u(e){try{return await c(new URL(e,l),`utf8`)}catch{return`(resource unavailable: ${e})`}}function d(e,t){return{content:[{type:`text`,text:t}],details:{action:e}}}function f({host:c}){if(c.context.directEvents===void 0)throw Error(`Git headless facet requires the session direct event bus.`);if(c.context.sessionId===void 0)throw Error(`Git headless facet requires a session identity.`);let l=c.context.sessionId,f=c.context.directEvents,p=t(f,l),m=n({git:e(),sessionService:c.context.sessionService,messageInbox:p});return{resources:[{name:`doompi-git`,kind:`context`,read:()=>u(`llms.txt`)},{name:`doompi-use-git`,kind:`skill`,read:()=>u(`src/prompts/doompi-use-git/SKILL.md`)},{name:`doompi-git-readme`,kind:`context`,read:()=>u(`README.md`)}],tools:[{name:a,label:`Worktree`,description:i,parameters:r,promptSnippet:`Create and manage Git worktree sessions`,executionMode:`serial`,async execute(e,t,n,r,i){let a=s(t);return o(a,m,i,{...n===void 0?{}:{signal:n},onProgress:e=>r?.(d(a.action,e))})}}],onDispose:()=>p.close()}}export{f as createGitSession};
|
|
2
2
|
//# sourceMappingURL=gitSession.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitSession.mjs","names":[],"sources":["../../src/controllers/gitSession.ts"],"sourcesContent":["import { readFile } from 'node:fs/promises';\n\nimport {\n type DoomHeadlessResource,\n type DoomHeadlessTool,\n type DoomHeadlessToolResult,\n} from '@agimon-ai/doompi-core/headless';\nimport type { DoomServerPluginContext, DoomServerSessionPlugin } from '@agimon-ai/doompi-core/server-facet';\n\nimport {
|
|
1
|
+
{"version":3,"file":"gitSession.mjs","names":[],"sources":["../../src/controllers/gitSession.ts"],"sourcesContent":["import { readFile } from 'node:fs/promises';\n\nimport {\n type DoomHeadlessResource,\n type DoomHeadlessTool,\n type DoomHeadlessToolResult,\n} from '@agimon-ai/doompi-core/headless';\nimport type { DoomServerPluginContext, DoomServerSessionPlugin } from '@agimon-ai/doompi-core/server-facet';\n\nimport { RunWorktreeToolSchema, type RunWorktreeToolParams } from '../schemas/runWorktreeTool';\nimport { createWorktreeGit } from '../services/gitCli';\nimport {\n executeRunWorktreeTool,\n RUN_WORKTREE_DESCRIPTION,\n RUN_WORKTREE_TOOL_NAME,\n validateParams,\n} from '../services/runWorktree';\nimport { createWorktreeMessageInbox } from '../services/worktreeEvents';\nimport { createWorktreeOperations } from '../services/worktreeOperations';\n\nconst PACKAGE_ROOT = new URL('../../', import.meta.url);\n\nasync function readPackageResource(name: string): Promise<string> {\n try {\n return await readFile(new URL(name, PACKAGE_ROOT), 'utf8');\n } catch {\n return `(resource unavailable: ${name})`;\n }\n}\n\nfunction progressResult(action: RunWorktreeToolParams['action'], label: string): DoomHeadlessToolResult {\n return { content: [{ type: 'text', text: label }], details: { action } };\n}\n\nexport function createGitSession({ host: serverHost }: DoomServerPluginContext): DoomServerSessionPlugin {\n if (serverHost.context.directEvents === undefined)\n throw new Error('Git headless facet requires the session direct event bus.');\n if (serverHost.context.sessionId === undefined) throw new Error('Git headless facet requires a session identity.');\n const sessionId = serverHost.context.sessionId;\n const directEvents = serverHost.context.directEvents;\n const messageInbox = createWorktreeMessageInbox(directEvents, sessionId);\n const operations = createWorktreeOperations({\n git: createWorktreeGit(),\n sessionService: serverHost.context.sessionService,\n messageInbox,\n });\n const resources: DoomHeadlessResource[] = [\n { name: 'doompi-git', kind: 'context', read: () => readPackageResource('llms.txt') },\n {\n name: 'doompi-use-git',\n kind: 'skill',\n read: () => readPackageResource('src/prompts/doompi-use-git/SKILL.md'),\n },\n { name: 'doompi-git-readme', kind: 'context', read: () => readPackageResource('README.md') },\n ];\n\n const tool: DoomHeadlessTool<typeof RunWorktreeToolSchema> = {\n name: RUN_WORKTREE_TOOL_NAME,\n label: 'Worktree',\n description: RUN_WORKTREE_DESCRIPTION,\n parameters: RunWorktreeToolSchema,\n promptSnippet: 'Create and manage Git worktree sessions',\n executionMode: 'serial',\n async execute(_toolCallId, parameters, signal, onUpdate, execution) {\n const params = validateParams(parameters) as RunWorktreeToolParams;\n return executeRunWorktreeTool(params, operations, execution, {\n ...(signal === undefined ? {} : { signal }),\n onProgress: (label) => onUpdate?.(progressResult(params.action, label)),\n });\n },\n };\n return { resources, tools: [tool], onDispose: () => messageInbox.close() };\n}\n"],"mappings":"mfAoBA,MAAM,EAAe,IAAI,IAAI,SAAU,YAAY,GAAG,EAEtD,eAAe,EAAoB,EAA+B,CAChE,GAAI,CACF,OAAO,MAAM,EAAS,IAAI,IAAI,EAAM,CAAY,EAAG,MAAM,CAC3D,MAAQ,CACN,MAAO,0BAA0B,EAAK,EACxC,CACF,CAEA,SAAS,EAAe,EAAyC,EAAuC,CACtG,MAAO,CAAE,QAAS,CAAC,CAAE,KAAM,OAAQ,KAAM,CAAM,CAAC,EAAG,QAAS,CAAE,QAAO,CAAE,CACzE,CAEA,SAAgB,EAAiB,CAAE,KAAM,GAAgE,CACvG,GAAI,EAAW,QAAQ,eAAiB,IAAA,GACtC,MAAU,MAAM,2DAA2D,EAC7E,GAAI,EAAW,QAAQ,YAAc,IAAA,GAAW,MAAU,MAAM,iDAAiD,EACjH,IAAM,EAAY,EAAW,QAAQ,UAC/B,EAAe,EAAW,QAAQ,aAClC,EAAe,EAA2B,EAAc,CAAS,EACjE,EAAa,EAAyB,CAC1C,IAAK,EAAkB,EACvB,eAAgB,EAAW,QAAQ,eACnC,cACF,CAAC,EA0BD,MAAO,CAAE,UAAA,CAxBP,CAAE,KAAM,aAAc,KAAM,UAAW,SAAY,EAAoB,UAAU,CAAE,EACnF,CACE,KAAM,iBACN,KAAM,QACN,SAAY,EAAoB,qCAAqC,CACvE,EACA,CAAE,KAAM,oBAAqB,KAAM,UAAW,SAAY,EAAoB,WAAW,CAAE,CAkB5E,EAAG,MAAO,CAAC,CAd1B,KAAM,EACN,MAAO,WACP,YAAa,EACb,WAAY,EACZ,cAAe,0CACf,cAAe,SACf,MAAM,QAAQ,EAAa,EAAY,EAAQ,EAAU,EAAW,CAClE,IAAM,EAAS,EAAe,CAAU,EACxC,OAAO,EAAuB,EAAQ,EAAY,EAAW,CAC3D,GAAI,IAAW,IAAA,GAAY,CAAC,EAAI,CAAE,QAAO,EACzC,WAAa,GAAU,IAAW,EAAe,EAAO,OAAQ,CAAK,CAAC,CACxE,CAAC,CACH,CAE6B,CAAC,EAAG,cAAiB,EAAa,MAAM,CAAE,CAC3E"}
|
package/dist/extensions/pi.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GitExtensionDependencies } from "../types/extension.cjs";
|
|
2
2
|
//#region src/extensions/pi.d.ts
|
|
3
|
-
declare const activateGitExtension: import("@agimon-ai/doompi-core/runtime-pi-extension").DefinedPiExtension<Partial<GitExtensionDependencies>>;
|
|
3
|
+
export declare const activateGitExtension: import("@agimon-ai/doompi-core/runtime-pi-extension").DefinedPiExtension<Partial<GitExtensionDependencies>>;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { activateGitExtension
|
|
5
|
+
export { activateGitExtension as default };
|
|
6
6
|
//# sourceMappingURL=pi.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pi.d.cts","names":[],"sources":["../../src/extensions/pi.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"pi.d.cts","names":[],"sources":["../../src/extensions/pi.ts"],"mappings":";;qBAUa,4EAAoB,mBAAA,QAAA"}
|
package/dist/extensions/pi.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GitExtensionDependencies } from "../types/extension.mjs";
|
|
2
2
|
//#region src/extensions/pi.d.ts
|
|
3
|
-
declare const activateGitExtension: import("@agimon-ai/doompi-core/runtime-pi-extension").DefinedPiExtension<Partial<GitExtensionDependencies>>;
|
|
3
|
+
export declare const activateGitExtension: import("@agimon-ai/doompi-core/runtime-pi-extension").DefinedPiExtension<Partial<GitExtensionDependencies>>;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { activateGitExtension
|
|
5
|
+
export { activateGitExtension as default };
|
|
6
6
|
//# sourceMappingURL=pi.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pi.d.mts","names":[],"sources":["../../src/extensions/pi.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"pi.d.mts","names":[],"sources":["../../src/extensions/pi.ts"],"mappings":";;qBAUa,4EAAoB,mBAAA,QAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/extensions/server.d.ts
|
|
2
|
-
declare const gitServerFacet: import("@agimon-ai/doompi-core/server-facet").DoomServerFacet;
|
|
2
|
+
export declare const gitServerFacet: import("@agimon-ai/doompi-core/server-facet").DoomServerFacet;
|
|
3
3
|
//#endregion
|
|
4
|
-
export { gitServerFacet as default
|
|
4
|
+
export { gitServerFacet as default };
|
|
5
5
|
//# sourceMappingURL=server.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.cts","names":[],"sources":["../../src/extensions/server.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"server.d.cts","names":[],"sources":["../../src/extensions/server.ts"],"mappings":";qBAKa,8DAAc"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/extensions/server.d.ts
|
|
2
|
-
declare const gitServerFacet: import("@agimon-ai/doompi-core/server-facet").DoomServerFacet;
|
|
2
|
+
export declare const gitServerFacet: import("@agimon-ai/doompi-core/server-facet").DoomServerFacet;
|
|
3
3
|
//#endregion
|
|
4
|
-
export { gitServerFacet as default
|
|
4
|
+
export { gitServerFacet as default };
|
|
5
5
|
//# sourceMappingURL=server.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.mts","names":[],"sources":["../../src/extensions/server.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"server.d.mts","names":[],"sources":["../../src/extensions/server.ts"],"mappings":";qBAKa,8DAAc"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "typebox";
|
|
2
2
|
//#region src/schemas/apiContracts.d.ts
|
|
3
|
-
declare const apiContracts: {
|
|
3
|
+
export declare const apiContracts: {
|
|
4
4
|
version: 1;
|
|
5
5
|
protocols?: Record<string, string> | undefined;
|
|
6
6
|
schemas?: Record<string, boolean | object> | undefined;
|
|
@@ -49,5 +49,5 @@ declare const apiContracts: {
|
|
|
49
49
|
gaps?: string[] | undefined;
|
|
50
50
|
};
|
|
51
51
|
//#endregion
|
|
52
|
-
export { apiContracts
|
|
52
|
+
export { apiContracts as default };
|
|
53
53
|
//# sourceMappingURL=apiContracts.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiContracts.d.cts","names":[],"sources":["../../src/schemas/apiContracts.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"apiContracts.d.cts","names":[],"sources":["../../src/schemas/apiContracts.ts"],"mappings":";;qBAkCa"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from "typebox";
|
|
2
2
|
//#region src/schemas/apiContracts.d.ts
|
|
3
|
-
declare const apiContracts: {
|
|
3
|
+
export declare const apiContracts: {
|
|
4
4
|
version: 1;
|
|
5
5
|
protocols?: Record<string, string> | undefined;
|
|
6
6
|
schemas?: Record<string, boolean | object> | undefined;
|
|
@@ -49,5 +49,5 @@ declare const apiContracts: {
|
|
|
49
49
|
gaps?: string[] | undefined;
|
|
50
50
|
};
|
|
51
51
|
//#endregion
|
|
52
|
-
export { apiContracts
|
|
52
|
+
export { apiContracts as default };
|
|
53
53
|
//# sourceMappingURL=apiContracts.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiContracts.d.mts","names":[],"sources":["../../src/schemas/apiContracts.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"apiContracts.d.mts","names":[],"sources":["../../src/schemas/apiContracts.ts"],"mappings":";;qBAkCa"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let e=require("typebox");const t={spawn_worktree:`spawn_worktree`,close_worktree:`close_worktree`,list:`list`,status:`status`,merge:`merge`,prune:`prune`,send:`send`,messages:`messages`},n={spawn_worktree:[`action`,`branch`,`baseRef`,`task`,`name`],close_worktree:[`action`,`id`,`force`],list:[`action`],status:[`action`,`id`],merge:[`action`,`id`,`message`],prune:[`action`,`dryRun`],send:[`action`,`id`,`message`],messages:[`action`,`id`]},r=e.Type.Object({action:e.Type.Literal(t.spawn_worktree),branch:e.Type.String({minLength:1}),baseRef:e.Type.Optional(e.Type.String({minLength:1})),task:e.Type.Optional(e.Type.String({minLength:1})),name:e.Type.Optional(e.Type.String({minLength:1}))},{additionalProperties:!1}),i=e.Type.Object({action:e.Type.Literal(t.close_worktree),id:e.Type.String({minLength:1}),force:e.Type.Optional(e.Type.Boolean())},{additionalProperties:!1}),a=e.Type.Object({action:e.Type.Literal(t.list)},{additionalProperties:!1}),o=e.Type.Object({action:e.Type.Literal(t.status),id:e.Type.String({minLength:1})},{additionalProperties:!1}),s=e.Type.Object({action:e.Type.Literal(t.merge),id:e.Type.String({minLength:1}),message:e.Type.Optional(e.Type.String({minLength:1}))},{additionalProperties:!1}),c=e.Type.Object({action:e.Type.Literal(t.prune),dryRun:e.Type.Optional(e.Type.Boolean())},{additionalProperties:!1}),l=e.Type.Object({action:e.Type.Literal(t.send),id:e.Type.String({minLength:1}),message:e.Type.String({minLength:1})},{additionalProperties:!1}),u=e.Type.Object({action:e.Type.Literal(t.messages),id:e.Type.String({minLength:1})},{additionalProperties:!1})
|
|
1
|
+
let e=require("typebox");const t={spawn_worktree:`spawn_worktree`,close_worktree:`close_worktree`,list:`list`,status:`status`,merge:`merge`,prune:`prune`,send:`send`,messages:`messages`},n={spawn_worktree:[`action`,`branch`,`baseRef`,`task`,`name`],close_worktree:[`action`,`id`,`force`],list:[`action`],status:[`action`,`id`],merge:[`action`,`id`,`message`],prune:[`action`,`dryRun`],send:[`action`,`id`,`message`],messages:[`action`,`id`]},r=e.Type.Object({action:e.Type.Literal(t.spawn_worktree),branch:e.Type.String({minLength:1}),baseRef:e.Type.Optional(e.Type.String({minLength:1})),task:e.Type.Optional(e.Type.String({minLength:1})),name:e.Type.Optional(e.Type.String({minLength:1}))},{additionalProperties:!1}),i=e.Type.Object({action:e.Type.Literal(t.close_worktree),id:e.Type.String({minLength:1}),force:e.Type.Optional(e.Type.Boolean())},{additionalProperties:!1}),a=e.Type.Object({action:e.Type.Literal(t.list)},{additionalProperties:!1}),o=e.Type.Object({action:e.Type.Literal(t.status),id:e.Type.String({minLength:1})},{additionalProperties:!1}),s=e.Type.Object({action:e.Type.Literal(t.merge),id:e.Type.String({minLength:1}),message:e.Type.Optional(e.Type.String({minLength:1}))},{additionalProperties:!1}),c=e.Type.Object({action:e.Type.Literal(t.prune),dryRun:e.Type.Optional(e.Type.Boolean())},{additionalProperties:!1}),l=e.Type.Object({action:e.Type.Literal(t.send),id:e.Type.String({minLength:1}),message:e.Type.String({minLength:1})},{additionalProperties:!1}),u=e.Type.Object({action:e.Type.Literal(t.messages),id:e.Type.String({minLength:1})},{additionalProperties:!1});e.Type.Union([r,i,a,o,s,c,l,u]);function d(e){return Object.values(t).filter(t=>n[t].includes(e)).join(`, `)}const f=e.Type.Object({action:e.Type.String({enum:Object.values(t),description:`The operation to run. Every other field is accepted only by the actions its description names.`}),branch:e.Type.Optional(e.Type.String({minLength:1,description:`New branch to create. Actions: ${d(`branch`)}.`})),baseRef:e.Type.Optional(e.Type.String({minLength:1,description:`Base ref, defaulting to the current branch. Actions: ${d(`baseRef`)}.`})),task:e.Type.Optional(e.Type.String({minLength:1,description:`First message for the new session. Actions: ${d(`task`)}.`})),name:e.Type.Optional(e.Type.String({minLength:1,description:`Rail label for the worktree. Actions: ${d(`name`)}.`})),id:e.Type.Optional(e.Type.String({minLength:1,description:`Worktree id. Actions: ${d(`id`)}.`})),force:e.Type.Optional(e.Type.Boolean({description:`Close even when the tree is dirty. Actions: ${d(`force`)}.`})),message:e.Type.Optional(e.Type.String({minLength:1,description:`Merge commit message, or the text to send. Actions: ${d(`message`)}.`})),dryRun:e.Type.Optional(e.Type.Boolean({description:`Report the plan without destroying anything. Actions: ${d(`dryRun`)}.`}))},{additionalProperties:!1});exports.RunWorktreeToolSchema=f,exports.WORKTREE_ACTIONS=t,exports.WORKTREE_ACTION_FIELDS=n;
|
|
2
2
|
//# sourceMappingURL=runWorktreeTool.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runWorktreeTool.cjs","names":["Type"],"sources":["../../src/schemas/runWorktreeTool.ts"],"sourcesContent":["import { type Static, Type } from 'typebox';\n\n/**\n * The tool's action vocabulary.\n *\n * One tool with an action field rather than six tools, matching `subagent`:\n * the actions share a subject and are meaningless apart from it, and six\n * separate tools would spend six description budgets teaching the same nouns.\n */\nexport const WORKTREE_ACTIONS = {\n spawn_worktree: 'spawn_worktree',\n close_worktree: 'close_worktree',\n list: 'list',\n status: 'status',\n merge: 'merge',\n prune: 'prune',\n send: 'send',\n messages: 'messages',\n} as const;\n\nexport type WorktreeAction = (typeof WORKTREE_ACTIONS)[keyof typeof WORKTREE_ACTIONS];\n\n/**\n * Which fields each action accepts.\n *\n * Rejecting an unknown field is what stops a plausible-looking call from doing\n * something other than what it reads like: `close_worktree` with `branch`\n * instead of `id` would otherwise close whatever the default resolved to.\n */\nexport const WORKTREE_ACTION_FIELDS: Record<WorktreeAction, readonly string[]> = {\n spawn_worktree: ['action', 'branch', 'baseRef', 'task', 'name'],\n close_worktree: ['action', 'id', 'force'],\n list: ['action'],\n status: ['action', 'id'],\n merge: ['action', 'id', 'message'],\n prune: ['action', 'dryRun'],\n send: ['action', 'id', 'message'],\n messages: ['action', 'id'],\n};\n\nconst SpawnParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.spawn_worktree),\n branch: Type.String({ minLength: 1 }),\n baseRef: Type.Optional(Type.String({ minLength: 1 })),\n task: Type.Optional(Type.String({ minLength: 1 })),\n name: Type.Optional(Type.String({ minLength: 1 })),\n },\n { additionalProperties: false },\n);\n\nconst CloseParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.close_worktree),\n id: Type.String({ minLength: 1 }),\n force: Type.Optional(Type.Boolean()),\n },\n { additionalProperties: false },\n);\n\nconst ListParams = Type.Object({ action: Type.Literal(WORKTREE_ACTIONS.list) }, { additionalProperties: false });\n\nconst StatusParams = Type.Object(\n { action: Type.Literal(WORKTREE_ACTIONS.status), id: Type.String({ minLength: 1 }) },\n { additionalProperties: false },\n);\n\nconst MergeParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.merge),\n id: Type.String({ minLength: 1 }),\n message: Type.Optional(Type.String({ minLength: 1 })),\n },\n { additionalProperties: false },\n);\n\nconst PruneParams = Type.Object(\n { action: Type.Literal(WORKTREE_ACTIONS.prune), dryRun: Type.Optional(Type.Boolean()) },\n { additionalProperties: false },\n);\n\nconst SendParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.send),\n id: Type.String({ minLength: 1 }),\n message: Type.String({ minLength: 1 }),\n },\n { additionalProperties: false },\n);\n\nconst MessagesParams = Type.Object(\n { action: Type.Literal(WORKTREE_ACTIONS.messages), id: Type.String({ minLength: 1 }) },\n { additionalProperties: false },\n);\n\nexport const RunWorktreeParams = Type.Union([\n SpawnParams,\n CloseParams,\n ListParams,\n StatusParams,\n MergeParams,\n PruneParams,\n SendParams,\n MessagesParams,\n]);\n\nexport type RunWorktreeToolParams = Static<typeof RunWorktreeParams>;\n"],"mappings":"yBASA,MAAa,EAAmB,CAC9B,eAAgB,iBAChB,eAAgB,iBAChB,KAAM,OACN,OAAQ,SACR,MAAO,QACP,MAAO,QACP,KAAM,OACN,SAAU,UACZ,EAWa,EAAoE,CAC/E,eAAgB,CAAC,SAAU,SAAU,UAAW,OAAQ,MAAM,EAC9D,eAAgB,CAAC,SAAU,KAAM,OAAO,EACxC,KAAM,CAAC,QAAQ,EACf,OAAQ,CAAC,SAAU,IAAI,EACvB,MAAO,CAAC,SAAU,KAAM,SAAS,EACjC,MAAO,CAAC,SAAU,QAAQ,EAC1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,EACA,CAAE,qBAAsB,EAAM,CAChC,EAEM,EAAcA,EAAAA,KAAK,OACvB,CAAE,OAAQA,EAAAA,KAAK,QAAQ,EAAiB,KAAK,EAAG,OAAQA,EAAAA,KAAK,SAASA,EAAAA,KAAK,QAAQ,CAAC,CAAE,EACtF,CAAE,qBAAsB,EAAM,CAChC,EAEM,EAAaA,EAAAA,KAAK,OACtB,CACE,OAAQA,EAAAA,KAAK,QAAQ,EAAiB,IAAI,EAC1C,GAAIA,EAAAA,KAAK,OAAO,CAAE,UAAW,CAAE,CAAC,EAChC,QAASA,EAAAA,KAAK,OAAO,CAAE,UAAW,CAAE,CAAC,CACvC,EACA,CAAE,qBAAsB,EAAM,CAChC,EAEM,EAAiBA,EAAAA,KAAK,OAC1B,CAAE,OAAQA,EAAAA,KAAK,QAAQ,EAAiB,QAAQ,EAAG,GAAIA,EAAAA,KAAK,OAAO,CAAE,UAAW,CAAE,CAAC,CAAE,EACrF,CAAE,qBAAsB,EAAM,CAChC,
|
|
1
|
+
{"version":3,"file":"runWorktreeTool.cjs","names":["Type"],"sources":["../../src/schemas/runWorktreeTool.ts"],"sourcesContent":["import { type Static, Type } from 'typebox';\n\n/**\n * The tool's action vocabulary.\n *\n * One tool with an action field rather than six tools, matching `subagent`:\n * the actions share a subject and are meaningless apart from it, and six\n * separate tools would spend six description budgets teaching the same nouns.\n */\nexport const WORKTREE_ACTIONS = {\n spawn_worktree: 'spawn_worktree',\n close_worktree: 'close_worktree',\n list: 'list',\n status: 'status',\n merge: 'merge',\n prune: 'prune',\n send: 'send',\n messages: 'messages',\n} as const;\n\nexport type WorktreeAction = (typeof WORKTREE_ACTIONS)[keyof typeof WORKTREE_ACTIONS];\n\n/**\n * Which fields each action accepts.\n *\n * Rejecting an unknown field is what stops a plausible-looking call from doing\n * something other than what it reads like: `close_worktree` with `branch`\n * instead of `id` would otherwise close whatever the default resolved to.\n */\nexport const WORKTREE_ACTION_FIELDS: Record<WorktreeAction, readonly string[]> = {\n spawn_worktree: ['action', 'branch', 'baseRef', 'task', 'name'],\n close_worktree: ['action', 'id', 'force'],\n list: ['action'],\n status: ['action', 'id'],\n merge: ['action', 'id', 'message'],\n prune: ['action', 'dryRun'],\n send: ['action', 'id', 'message'],\n messages: ['action', 'id'],\n};\n\nconst SpawnParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.spawn_worktree),\n branch: Type.String({ minLength: 1 }),\n baseRef: Type.Optional(Type.String({ minLength: 1 })),\n task: Type.Optional(Type.String({ minLength: 1 })),\n name: Type.Optional(Type.String({ minLength: 1 })),\n },\n { additionalProperties: false },\n);\n\nconst CloseParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.close_worktree),\n id: Type.String({ minLength: 1 }),\n force: Type.Optional(Type.Boolean()),\n },\n { additionalProperties: false },\n);\n\nconst ListParams = Type.Object({ action: Type.Literal(WORKTREE_ACTIONS.list) }, { additionalProperties: false });\n\nconst StatusParams = Type.Object(\n { action: Type.Literal(WORKTREE_ACTIONS.status), id: Type.String({ minLength: 1 }) },\n { additionalProperties: false },\n);\n\nconst MergeParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.merge),\n id: Type.String({ minLength: 1 }),\n message: Type.Optional(Type.String({ minLength: 1 })),\n },\n { additionalProperties: false },\n);\n\nconst PruneParams = Type.Object(\n { action: Type.Literal(WORKTREE_ACTIONS.prune), dryRun: Type.Optional(Type.Boolean()) },\n { additionalProperties: false },\n);\n\nconst SendParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.send),\n id: Type.String({ minLength: 1 }),\n message: Type.String({ minLength: 1 }),\n },\n { additionalProperties: false },\n);\n\nconst MessagesParams = Type.Object(\n { action: Type.Literal(WORKTREE_ACTIONS.messages), id: Type.String({ minLength: 1 }) },\n { additionalProperties: false },\n);\n\nexport const RunWorktreeParams = Type.Union([\n SpawnParams,\n CloseParams,\n ListParams,\n StatusParams,\n MergeParams,\n PruneParams,\n SendParams,\n MessagesParams,\n]);\n\n/** The actions that accept `field`, so the declared docs cannot drift from the validator. */\nfunction acceptingActions(field: string): string {\n return Object.values(WORKTREE_ACTIONS)\n .filter((action) => WORKTREE_ACTION_FIELDS[action].includes(field))\n .join(', ');\n}\n\n/**\n * The schema declared to the model.\n *\n * A flat object rather than `RunWorktreeParams` itself. A top-level union is\n * `{anyOf:[...]}` with no `properties`, and Pi's Anthropic Messages adapter\n * rebuilds tool input as `{type:'object', properties: schema.properties ?? {},\n * required: schema.required ?? []}`, so the union arrived at the model as an\n * empty object while the host went on validating calls against it. Nothing here\n * relaxes what is accepted: `validateParams` still rejects an unknown action, a\n * field the action does not take, and a missing required one.\n */\nexport const RunWorktreeToolSchema = Type.Object(\n {\n action: Type.String({\n enum: Object.values(WORKTREE_ACTIONS),\n description: 'The operation to run. Every other field is accepted only by the actions its description names.',\n }),\n branch: Type.Optional(\n Type.String({ minLength: 1, description: `New branch to create. Actions: ${acceptingActions('branch')}.` }),\n ),\n baseRef: Type.Optional(\n Type.String({\n minLength: 1,\n description: `Base ref, defaulting to the current branch. Actions: ${acceptingActions('baseRef')}.`,\n }),\n ),\n task: Type.Optional(\n Type.String({\n minLength: 1,\n description: `First message for the new session. Actions: ${acceptingActions('task')}.`,\n }),\n ),\n name: Type.Optional(\n Type.String({ minLength: 1, description: `Rail label for the worktree. Actions: ${acceptingActions('name')}.` }),\n ),\n id: Type.Optional(Type.String({ minLength: 1, description: `Worktree id. Actions: ${acceptingActions('id')}.` })),\n force: Type.Optional(\n Type.Boolean({ description: `Close even when the tree is dirty. Actions: ${acceptingActions('force')}.` }),\n ),\n message: Type.Optional(\n Type.String({\n minLength: 1,\n description: `Merge commit message, or the text to send. Actions: ${acceptingActions('message')}.`,\n }),\n ),\n dryRun: Type.Optional(\n Type.Boolean({\n description: `Report the plan without destroying anything. Actions: ${acceptingActions('dryRun')}.`,\n }),\n ),\n },\n { additionalProperties: false },\n);\n\nexport type RunWorktreeToolParams = Static<typeof RunWorktreeParams>;\n"],"m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KAAK,OACxC,CACE,OAAQA,EAAAA,KAAK,OAAO,CAClB,KAAM,OAAO,OAAO,CAAgB,EACpC,YAAa,gGACf,CAAC,EACD,OAAQA,EAAAA,KAAK,SACXA,EAAAA,KAAK,OAAO,CAAE,UAAW,EAAG,YAAa,kCAAkC,EAAiB,QAAQ,EAAE,EAAG,CAAC,CAC5G,EACA,QAASA,EAAAA,KAAK,SACZA,EAAAA,KAAK,OAAO,CACV,UAAW,EACX,YAAa,wDAAwD,EAAiB,SAAS,EAAE,EACnG,CAAC,CACH,EACA,KAAMA,EAAAA,KAAK,SACTA,EAAAA,KAAK,OAAO,CACV,UAAW,EACX,YAAa,+CAA+C,EAAiB,MAAM,EAAE,EACvF,CAAC,CACH,EACA,KAAMA,EAAAA,KAAK,SACTA,EAAAA,KAAK,OAAO,CAAE,UAAW,EAAG,YAAa,yCAAyC,EAAiB,MAAM,EAAE,EAAG,CAAC,CACjH,EACA,GAAIA,EAAAA,KAAK,SAASA,EAAAA,KAAK,OAAO,CAAE,UAAW,EAAG,YAAa,yBAAyB,EAAiB,IAAI,EAAE,EAAG,CAAC,CAAC,EAChH,MAAOA,EAAAA,KAAK,SACVA,EAAAA,KAAK,QAAQ,CAAE,YAAa,+CAA+C,EAAiB,OAAO,EAAE,EAAG,CAAC,CAC3G,EACA,QAASA,EAAAA,KAAK,SACZA,EAAAA,KAAK,OAAO,CACV,UAAW,EACX,YAAa,uDAAuD,EAAiB,SAAS,EAAE,EAClG,CAAC,CACH,EACA,OAAQA,EAAAA,KAAK,SACXA,EAAAA,KAAK,QAAQ,CACX,YAAa,yDAAyD,EAAiB,QAAQ,EAAE,EACnG,CAAC,CACH,CACF,EACA,CAAE,qBAAsB,EAAM,CAChC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Type as e}from"typebox";const t={spawn_worktree:`spawn_worktree`,close_worktree:`close_worktree`,list:`list`,status:`status`,merge:`merge`,prune:`prune`,send:`send`,messages:`messages`},n={spawn_worktree:[`action`,`branch`,`baseRef`,`task`,`name`],close_worktree:[`action`,`id`,`force`],list:[`action`],status:[`action`,`id`],merge:[`action`,`id`,`message`],prune:[`action`,`dryRun`],send:[`action`,`id`,`message`],messages:[`action`,`id`]},r=e.Object({action:e.Literal(t.spawn_worktree),branch:e.String({minLength:1}),baseRef:e.Optional(e.String({minLength:1})),task:e.Optional(e.String({minLength:1})),name:e.Optional(e.String({minLength:1}))},{additionalProperties:!1}),i=e.Object({action:e.Literal(t.close_worktree),id:e.String({minLength:1}),force:e.Optional(e.Boolean())},{additionalProperties:!1}),a=e.Object({action:e.Literal(t.list)},{additionalProperties:!1}),o=e.Object({action:e.Literal(t.status),id:e.String({minLength:1})},{additionalProperties:!1}),s=e.Object({action:e.Literal(t.merge),id:e.String({minLength:1}),message:e.Optional(e.String({minLength:1}))},{additionalProperties:!1}),c=e.Object({action:e.Literal(t.prune),dryRun:e.Optional(e.Boolean())},{additionalProperties:!1}),l=e.Object({action:e.Literal(t.send),id:e.String({minLength:1}),message:e.String({minLength:1})},{additionalProperties:!1}),u=e.Object({action:e.Literal(t.messages),id:e.String({minLength:1})},{additionalProperties:!1})
|
|
1
|
+
import{Type as e}from"typebox";const t={spawn_worktree:`spawn_worktree`,close_worktree:`close_worktree`,list:`list`,status:`status`,merge:`merge`,prune:`prune`,send:`send`,messages:`messages`},n={spawn_worktree:[`action`,`branch`,`baseRef`,`task`,`name`],close_worktree:[`action`,`id`,`force`],list:[`action`],status:[`action`,`id`],merge:[`action`,`id`,`message`],prune:[`action`,`dryRun`],send:[`action`,`id`,`message`],messages:[`action`,`id`]},r=e.Object({action:e.Literal(t.spawn_worktree),branch:e.String({minLength:1}),baseRef:e.Optional(e.String({minLength:1})),task:e.Optional(e.String({minLength:1})),name:e.Optional(e.String({minLength:1}))},{additionalProperties:!1}),i=e.Object({action:e.Literal(t.close_worktree),id:e.String({minLength:1}),force:e.Optional(e.Boolean())},{additionalProperties:!1}),a=e.Object({action:e.Literal(t.list)},{additionalProperties:!1}),o=e.Object({action:e.Literal(t.status),id:e.String({minLength:1})},{additionalProperties:!1}),s=e.Object({action:e.Literal(t.merge),id:e.String({minLength:1}),message:e.Optional(e.String({minLength:1}))},{additionalProperties:!1}),c=e.Object({action:e.Literal(t.prune),dryRun:e.Optional(e.Boolean())},{additionalProperties:!1}),l=e.Object({action:e.Literal(t.send),id:e.String({minLength:1}),message:e.String({minLength:1})},{additionalProperties:!1}),u=e.Object({action:e.Literal(t.messages),id:e.String({minLength:1})},{additionalProperties:!1});e.Union([r,i,a,o,s,c,l,u]);function d(e){return Object.values(t).filter(t=>n[t].includes(e)).join(`, `)}const f=e.Object({action:e.String({enum:Object.values(t),description:`The operation to run. Every other field is accepted only by the actions its description names.`}),branch:e.Optional(e.String({minLength:1,description:`New branch to create. Actions: ${d(`branch`)}.`})),baseRef:e.Optional(e.String({minLength:1,description:`Base ref, defaulting to the current branch. Actions: ${d(`baseRef`)}.`})),task:e.Optional(e.String({minLength:1,description:`First message for the new session. Actions: ${d(`task`)}.`})),name:e.Optional(e.String({minLength:1,description:`Rail label for the worktree. Actions: ${d(`name`)}.`})),id:e.Optional(e.String({minLength:1,description:`Worktree id. Actions: ${d(`id`)}.`})),force:e.Optional(e.Boolean({description:`Close even when the tree is dirty. Actions: ${d(`force`)}.`})),message:e.Optional(e.String({minLength:1,description:`Merge commit message, or the text to send. Actions: ${d(`message`)}.`})),dryRun:e.Optional(e.Boolean({description:`Report the plan without destroying anything. Actions: ${d(`dryRun`)}.`}))},{additionalProperties:!1});export{f as RunWorktreeToolSchema,t as WORKTREE_ACTIONS,n as WORKTREE_ACTION_FIELDS};
|
|
2
2
|
//# sourceMappingURL=runWorktreeTool.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runWorktreeTool.mjs","names":[],"sources":["../../src/schemas/runWorktreeTool.ts"],"sourcesContent":["import { type Static, Type } from 'typebox';\n\n/**\n * The tool's action vocabulary.\n *\n * One tool with an action field rather than six tools, matching `subagent`:\n * the actions share a subject and are meaningless apart from it, and six\n * separate tools would spend six description budgets teaching the same nouns.\n */\nexport const WORKTREE_ACTIONS = {\n spawn_worktree: 'spawn_worktree',\n close_worktree: 'close_worktree',\n list: 'list',\n status: 'status',\n merge: 'merge',\n prune: 'prune',\n send: 'send',\n messages: 'messages',\n} as const;\n\nexport type WorktreeAction = (typeof WORKTREE_ACTIONS)[keyof typeof WORKTREE_ACTIONS];\n\n/**\n * Which fields each action accepts.\n *\n * Rejecting an unknown field is what stops a plausible-looking call from doing\n * something other than what it reads like: `close_worktree` with `branch`\n * instead of `id` would otherwise close whatever the default resolved to.\n */\nexport const WORKTREE_ACTION_FIELDS: Record<WorktreeAction, readonly string[]> = {\n spawn_worktree: ['action', 'branch', 'baseRef', 'task', 'name'],\n close_worktree: ['action', 'id', 'force'],\n list: ['action'],\n status: ['action', 'id'],\n merge: ['action', 'id', 'message'],\n prune: ['action', 'dryRun'],\n send: ['action', 'id', 'message'],\n messages: ['action', 'id'],\n};\n\nconst SpawnParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.spawn_worktree),\n branch: Type.String({ minLength: 1 }),\n baseRef: Type.Optional(Type.String({ minLength: 1 })),\n task: Type.Optional(Type.String({ minLength: 1 })),\n name: Type.Optional(Type.String({ minLength: 1 })),\n },\n { additionalProperties: false },\n);\n\nconst CloseParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.close_worktree),\n id: Type.String({ minLength: 1 }),\n force: Type.Optional(Type.Boolean()),\n },\n { additionalProperties: false },\n);\n\nconst ListParams = Type.Object({ action: Type.Literal(WORKTREE_ACTIONS.list) }, { additionalProperties: false });\n\nconst StatusParams = Type.Object(\n { action: Type.Literal(WORKTREE_ACTIONS.status), id: Type.String({ minLength: 1 }) },\n { additionalProperties: false },\n);\n\nconst MergeParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.merge),\n id: Type.String({ minLength: 1 }),\n message: Type.Optional(Type.String({ minLength: 1 })),\n },\n { additionalProperties: false },\n);\n\nconst PruneParams = Type.Object(\n { action: Type.Literal(WORKTREE_ACTIONS.prune), dryRun: Type.Optional(Type.Boolean()) },\n { additionalProperties: false },\n);\n\nconst SendParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.send),\n id: Type.String({ minLength: 1 }),\n message: Type.String({ minLength: 1 }),\n },\n { additionalProperties: false },\n);\n\nconst MessagesParams = Type.Object(\n { action: Type.Literal(WORKTREE_ACTIONS.messages), id: Type.String({ minLength: 1 }) },\n { additionalProperties: false },\n);\n\nexport const RunWorktreeParams = Type.Union([\n SpawnParams,\n CloseParams,\n ListParams,\n StatusParams,\n MergeParams,\n PruneParams,\n SendParams,\n MessagesParams,\n]);\n\nexport type RunWorktreeToolParams = Static<typeof RunWorktreeParams>;\n"],"mappings":"+BASA,MAAa,EAAmB,CAC9B,eAAgB,iBAChB,eAAgB,iBAChB,KAAM,OACN,OAAQ,SACR,MAAO,QACP,MAAO,QACP,KAAM,OACN,SAAU,UACZ,EAWa,EAAoE,CAC/E,eAAgB,CAAC,SAAU,SAAU,UAAW,OAAQ,MAAM,EAC9D,eAAgB,CAAC,SAAU,KAAM,OAAO,EACxC,KAAM,CAAC,QAAQ,EACf,OAAQ,CAAC,SAAU,IAAI,EACvB,MAAO,CAAC,SAAU,KAAM,SAAS,EACjC,MAAO,CAAC,SAAU,QAAQ,EAC1B,KAAM,CAAC,SAAU,KAAM,SAAS,EAChC,SAAU,CAAC,SAAU,IAAI,CAC3B,EAEM,EAAc,EAAK,OACvB,CACE,OAAQ,EAAK,QAAQ,EAAiB,cAAc,EACpD,OAAQ,EAAK,OAAO,CAAE,UAAW,CAAE,CAAC,EACpC,QAAS,EAAK,SAAS,EAAK,OAAO,CAAE,UAAW,CAAE,CAAC,CAAC,EACpD,KAAM,EAAK,SAAS,EAAK,OAAO,CAAE,UAAW,CAAE,CAAC,CAAC,EACjD,KAAM,EAAK,SAAS,EAAK,OAAO,CAAE,UAAW,CAAE,CAA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orktreeTool.mjs","names":[],"sources":["../../src/schemas/runWorktreeTool.ts"],"sourcesContent":["import { type Static, Type } from 'typebox';\n\n/**\n * The tool's action vocabulary.\n *\n * One tool with an action field rather than six tools, matching `subagent`:\n * the actions share a subject and are meaningless apart from it, and six\n * separate tools would spend six description budgets teaching the same nouns.\n */\nexport const WORKTREE_ACTIONS = {\n spawn_worktree: 'spawn_worktree',\n close_worktree: 'close_worktree',\n list: 'list',\n status: 'status',\n merge: 'merge',\n prune: 'prune',\n send: 'send',\n messages: 'messages',\n} as const;\n\nexport type WorktreeAction = (typeof WORKTREE_ACTIONS)[keyof typeof WORKTREE_ACTIONS];\n\n/**\n * Which fields each action accepts.\n *\n * Rejecting an unknown field is what stops a plausible-looking call from doing\n * something other than what it reads like: `close_worktree` with `branch`\n * instead of `id` would otherwise close whatever the default resolved to.\n */\nexport const WORKTREE_ACTION_FIELDS: Record<WorktreeAction, readonly string[]> = {\n spawn_worktree: ['action', 'branch', 'baseRef', 'task', 'name'],\n close_worktree: ['action', 'id', 'force'],\n list: ['action'],\n status: ['action', 'id'],\n merge: ['action', 'id', 'message'],\n prune: ['action', 'dryRun'],\n send: ['action', 'id', 'message'],\n messages: ['action', 'id'],\n};\n\nconst SpawnParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.spawn_worktree),\n branch: Type.String({ minLength: 1 }),\n baseRef: Type.Optional(Type.String({ minLength: 1 })),\n task: Type.Optional(Type.String({ minLength: 1 })),\n name: Type.Optional(Type.String({ minLength: 1 })),\n },\n { additionalProperties: false },\n);\n\nconst CloseParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.close_worktree),\n id: Type.String({ minLength: 1 }),\n force: Type.Optional(Type.Boolean()),\n },\n { additionalProperties: false },\n);\n\nconst ListParams = Type.Object({ action: Type.Literal(WORKTREE_ACTIONS.list) }, { additionalProperties: false });\n\nconst StatusParams = Type.Object(\n { action: Type.Literal(WORKTREE_ACTIONS.status), id: Type.String({ minLength: 1 }) },\n { additionalProperties: false },\n);\n\nconst MergeParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.merge),\n id: Type.String({ minLength: 1 }),\n message: Type.Optional(Type.String({ minLength: 1 })),\n },\n { additionalProperties: false },\n);\n\nconst PruneParams = Type.Object(\n { action: Type.Literal(WORKTREE_ACTIONS.prune), dryRun: Type.Optional(Type.Boolean()) },\n { additionalProperties: false },\n);\n\nconst SendParams = Type.Object(\n {\n action: Type.Literal(WORKTREE_ACTIONS.send),\n id: Type.String({ minLength: 1 }),\n message: Type.String({ minLength: 1 }),\n },\n { additionalProperties: false },\n);\n\nconst MessagesParams = Type.Object(\n { action: Type.Literal(WORKTREE_ACTIONS.messages), id: Type.String({ minLength: 1 }) },\n { additionalProperties: false },\n);\n\nexport const RunWorktreeParams = Type.Union([\n SpawnParams,\n CloseParams,\n ListParams,\n StatusParams,\n MergeParams,\n PruneParams,\n SendParams,\n MessagesParams,\n]);\n\n/** The actions that accept `field`, so the declared docs cannot drift from the validator. */\nfunction acceptingActions(field: string): string {\n return Object.values(WORKTREE_ACTIONS)\n .filter((action) => WORKTREE_ACTION_FIELDS[action].includes(field))\n .join(', ');\n}\n\n/**\n * The schema declared to the model.\n *\n * A flat object rather than `RunWorktreeParams` itself. A top-level union is\n * `{anyOf:[...]}` with no `properties`, and Pi's Anthropic Messages adapter\n * rebuilds tool input as `{type:'object', properties: schema.properties ?? {},\n * required: schema.required ?? []}`, so the union arrived at the model as an\n * empty object while the host went on validating calls against it. Nothing here\n * relaxes what is accepted: `validateParams` still rejects an unknown action, a\n * field the action does not take, and a missing required one.\n */\nexport const RunWorktreeToolSchema = Type.Object(\n {\n action: Type.String({\n enum: Object.values(WORKTREE_ACTIONS),\n description: 'The operation to run. Every other field is accepted only by the actions its description names.',\n }),\n branch: Type.Optional(\n Type.String({ minLength: 1, description: `New branch to create. Actions: ${acceptingActions('branch')}.` }),\n ),\n baseRef: Type.Optional(\n Type.String({\n minLength: 1,\n description: `Base ref, defaulting to the current branch. Actions: ${acceptingActions('baseRef')}.`,\n }),\n ),\n task: Type.Optional(\n Type.String({\n minLength: 1,\n description: `First message for the new session. Actions: ${acceptingActions('task')}.`,\n }),\n ),\n name: Type.Optional(\n Type.String({ minLength: 1, description: `Rail label for the worktree. Actions: ${acceptingActions('name')}.` }),\n ),\n id: Type.Optional(Type.String({ minLength: 1, description: `Worktree id. Actions: ${acceptingActions('id')}.` })),\n force: Type.Optional(\n Type.Boolean({ description: `Close even when the tree is dirty. Actions: ${acceptingActions('force')}.` }),\n ),\n message: Type.Optional(\n Type.String({\n minLength: 1,\n description: `Merge commit message, or the text to send. Actions: ${acceptingActions('message')}.`,\n }),\n ),\n dryRun: Type.Optional(\n Type.Boolean({\n description: `Report the plan without destroying anything. Actions: ${acceptingActions('dryRun')}.`,\n }),\n ),\n },\n { additionalProperties: false },\n);\n\nexport type RunWorktreeToolParams = Static<typeof RunWorktreeParams>;\n"],"mappings":"+BASA,MAAa,EAAmB,CAC9B,eAAgB,iBAChB,eAAgB,iBAChB,KAAM,OACN,OAAQ,SACR,MAAO,QACP,MAAO,QACP,KAAM,OACN,SAAU,UACZ,EAWa,EAAoE,CAC/E,eAAgB,CAAC,SAAU,SAAU,UAAW,OAAQ,MAAM,EAC9D,eAAgB,CAAC,SAAU,KAAM,OAAO,EACxC,KAAM,CAAC,QAAQ,EACf,OAAQ,CAAC,SAAU,IAAI,EACvB,MAAO,CAAC,SAAU,KAAM,SAAS,EACjC,MAAO,CAAC,SAAU,QAAQ,EAC1B,KAAM,CAAC,SAAU,KAAM,SAAS,EAChC,SAAU,CAAC,SAAU,IAAI,CAC3B,EAEM,EAAc,EAAK,OACvB,CACE,OAAQ,EAAK,QAAQ,EAAiB,cAAc,EACpD,OAAQ,EAAK,OAAO,CAAE,UAAW,CAAE,CAAC,EACpC,QAAS,EAAK,SAAS,EAAK,OAAO,CAAE,UAAW,CAAE,CAAC,CAAC,EACpD,KAAM,EAAK,SAAS,EAAK,OAAO,CAAE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
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { GitExtensionResult, GitExtensionService } from "../../types/extension.cjs";
|
|
2
2
|
//#region src/services/extensionService/index.d.ts
|
|
3
|
-
declare class DefaultGitExtensionService implements GitExtensionService {
|
|
3
|
+
export declare class DefaultGitExtensionService implements GitExtensionService {
|
|
4
4
|
execute(): Promise<GitExtensionResult>;
|
|
5
5
|
}
|
|
6
6
|
//#endregion
|
|
7
|
-
export { DefaultGitExtensionService };
|
|
8
7
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/extensionService/index.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/extensionService/index.ts"],"mappings":";;qBAGa,sCAAsC;EAC3C,WAAW,QAAQ"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { GitExtensionResult, GitExtensionService } from "../../types/extension.mjs";
|
|
2
2
|
//#region src/services/extensionService/index.d.ts
|
|
3
|
-
declare class DefaultGitExtensionService implements GitExtensionService {
|
|
3
|
+
export declare class DefaultGitExtensionService implements GitExtensionService {
|
|
4
4
|
execute(): Promise<GitExtensionResult>;
|
|
5
5
|
}
|
|
6
6
|
//#endregion
|
|
7
|
-
export { DefaultGitExtensionService };
|
|
8
7
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/services/extensionService/index.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/services/extensionService/index.ts"],"mappings":";;qBAGa,sCAAsC;EAC3C,WAAW,QAAQ"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { GitExtensionDependencies } from "../../types/extension.cjs";
|
|
2
2
|
//#region src/services/gitDependencies/index.d.ts
|
|
3
|
-
declare function createGitDependencies(overrides?: Partial<GitExtensionDependencies>): GitExtensionDependencies;
|
|
3
|
+
export declare function createGitDependencies(overrides?: Partial<GitExtensionDependencies>): GitExtensionDependencies;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { createGitDependencies };
|
|
6
5
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/gitDependencies/index.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/gitDependencies/index.ts"],"mappings":";;wBAMgB,sBAAsB,YAAW,QAAQ,4BAAiC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { GitExtensionDependencies } from "../../types/extension.mjs";
|
|
2
2
|
//#region src/services/gitDependencies/index.d.ts
|
|
3
|
-
declare function createGitDependencies(overrides?: Partial<GitExtensionDependencies>): GitExtensionDependencies;
|
|
3
|
+
export declare function createGitDependencies(overrides?: Partial<GitExtensionDependencies>): GitExtensionDependencies;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { createGitDependencies };
|
|
6
5
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/services/gitDependencies/index.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/services/gitDependencies/index.ts"],"mappings":";;wBAMgB,sBAAsB,YAAW,QAAQ,4BAAiC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@agimon-ai/doompi-core/hub-channel";
|
|
2
2
|
//#region src/services/worktreeEvents/index.d.ts
|
|
3
|
-
declare const WORKTREE_MESSAGE_VERSION: 1;
|
|
4
|
-
type WorktreeMessageParty = 'parent' | 'child';
|
|
5
|
-
interface WorktreeMessage {
|
|
3
|
+
export declare const WORKTREE_MESSAGE_VERSION: 1;
|
|
4
|
+
export type WorktreeMessageParty = 'parent' | 'child';
|
|
5
|
+
export interface WorktreeMessage {
|
|
6
6
|
readonly version: typeof WORKTREE_MESSAGE_VERSION;
|
|
7
7
|
readonly worktreeId: string;
|
|
8
8
|
readonly fromSessionId: string;
|
|
@@ -11,5 +11,4 @@ interface WorktreeMessage {
|
|
|
11
11
|
readonly sentAt: string;
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
|
-
export { WORKTREE_MESSAGE_VERSION, WorktreeMessage, WorktreeMessageParty };
|
|
15
14
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/worktreeEvents/index.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/worktreeEvents/index.ts"],"mappings":";;qBAIa;YASD;iBAEK;WACN,gBAAgB;WAChB;WACA;WACA,MAAM;WACN;WACA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@agimon-ai/doompi-core/hub-channel";
|
|
2
2
|
//#region src/services/worktreeEvents/index.d.ts
|
|
3
|
-
declare const WORKTREE_MESSAGE_VERSION: 1;
|
|
4
|
-
type WorktreeMessageParty = 'parent' | 'child';
|
|
5
|
-
interface WorktreeMessage {
|
|
3
|
+
export declare const WORKTREE_MESSAGE_VERSION: 1;
|
|
4
|
+
export type WorktreeMessageParty = 'parent' | 'child';
|
|
5
|
+
export interface WorktreeMessage {
|
|
6
6
|
readonly version: typeof WORKTREE_MESSAGE_VERSION;
|
|
7
7
|
readonly worktreeId: string;
|
|
8
8
|
readonly fromSessionId: string;
|
|
@@ -11,5 +11,4 @@ interface WorktreeMessage {
|
|
|
11
11
|
readonly sentAt: string;
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
|
-
export { WORKTREE_MESSAGE_VERSION, WorktreeMessage, WorktreeMessageParty };
|
|
15
14
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/services/worktreeEvents/index.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/services/worktreeEvents/index.ts"],"mappings":";;qBAIa;YASD;iBAEK;WACN,gBAAgB;WAChB;WACA;WACA,MAAM;WACN;WACA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WorktreeRecord } from "../../types/worktreeRegistry.cjs";
|
|
2
2
|
//#region src/services/worktreeNaming/index.d.ts
|
|
3
|
-
interface PrunePlan {
|
|
3
|
+
export interface PrunePlan {
|
|
4
4
|
/** Orphans whose directory git still lists, safe to remove. */
|
|
5
5
|
remove: WorktreeRecord[];
|
|
6
6
|
/** Orphans whose directory is already gone; drop the record only. */
|
|
@@ -23,12 +23,11 @@ interface PrunePlan {
|
|
|
23
23
|
* Separating the plan from the execution is what makes dryRun honest and lets
|
|
24
24
|
* the destructive half be reviewed on its own.
|
|
25
25
|
*/
|
|
26
|
-
declare function planPrune(input: {
|
|
26
|
+
export declare function planPrune(input: {
|
|
27
27
|
records: readonly WorktreeRecord[];
|
|
28
28
|
gitPaths: readonly string[];
|
|
29
29
|
worktreesRoot: string;
|
|
30
30
|
dirtyByPath: ReadonlyMap<string, readonly string[]>;
|
|
31
31
|
}): PrunePlan;
|
|
32
32
|
//#endregion
|
|
33
|
-
export { PrunePlan, planPrune };
|
|
34
33
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/worktreeNaming/index.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/worktreeNaming/index.ts"],"mappings":";;iBAoGiB;;EAEf,QAAQ;;EAER,QAAQ;;EAER;;EAEA,WAAW;;;;;;;EAOX;;;;;;;;wBASc,UAAU;EACxB,kBAAkB;EAClB;EACA;EACA,aAAa;IACX"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WorktreeRecord } from "../../types/worktreeRegistry.mjs";
|
|
2
2
|
//#region src/services/worktreeNaming/index.d.ts
|
|
3
|
-
interface PrunePlan {
|
|
3
|
+
export interface PrunePlan {
|
|
4
4
|
/** Orphans whose directory git still lists, safe to remove. */
|
|
5
5
|
remove: WorktreeRecord[];
|
|
6
6
|
/** Orphans whose directory is already gone; drop the record only. */
|
|
@@ -23,12 +23,11 @@ interface PrunePlan {
|
|
|
23
23
|
* Separating the plan from the execution is what makes dryRun honest and lets
|
|
24
24
|
* the destructive half be reviewed on its own.
|
|
25
25
|
*/
|
|
26
|
-
declare function planPrune(input: {
|
|
26
|
+
export declare function planPrune(input: {
|
|
27
27
|
records: readonly WorktreeRecord[];
|
|
28
28
|
gitPaths: readonly string[];
|
|
29
29
|
worktreesRoot: string;
|
|
30
30
|
dirtyByPath: ReadonlyMap<string, readonly string[]>;
|
|
31
31
|
}): PrunePlan;
|
|
32
32
|
//#endregion
|
|
33
|
-
export { PrunePlan, planPrune };
|
|
34
33
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/services/worktreeNaming/index.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/services/worktreeNaming/index.ts"],"mappings":";;iBAoGiB;;EAEf,QAAQ;;EAER,QAAQ;;EAER;;EAEA,WAAW;;;;;;;EAOX;;;;;;;;wBASc,UAAU;EACxB,kBAAkB;EAClB;EACA;EACA,aAAa;IACX"}
|
|
@@ -3,24 +3,24 @@ import { WorktreeRecord } from "../../types/worktreeRegistry.cjs";
|
|
|
3
3
|
import { planPrune } from "../worktreeNaming/index.cjs";
|
|
4
4
|
import "@agimon-ai/doompi-core/hub-channel";
|
|
5
5
|
//#region src/services/worktreeOperations/index.d.ts
|
|
6
|
-
interface WorktreeContext {
|
|
6
|
+
export interface WorktreeContext {
|
|
7
7
|
/** Where the calling session is working, used to find the repository. */
|
|
8
8
|
cwd: string;
|
|
9
9
|
/** The calling session, recorded as the new session's parent. */
|
|
10
10
|
sessionId: string;
|
|
11
11
|
}
|
|
12
|
-
interface SpawnWorktreeRequest {
|
|
12
|
+
export interface SpawnWorktreeRequest {
|
|
13
13
|
branch: string;
|
|
14
14
|
baseRef?: string;
|
|
15
15
|
name?: string;
|
|
16
16
|
}
|
|
17
|
-
interface SpawnOptions {
|
|
17
|
+
export interface SpawnOptions {
|
|
18
18
|
/** Aborted when the caller gives up, so a spawn nobody is waiting for stops. */
|
|
19
19
|
signal?: AbortSignal;
|
|
20
20
|
/** Phase labels, for a caller that can show them while the work runs. */
|
|
21
21
|
onProgress?: (label: string) => void;
|
|
22
22
|
}
|
|
23
|
-
interface WorktreeOperations {
|
|
23
|
+
export interface WorktreeOperations {
|
|
24
24
|
spawn(context: WorktreeContext, request: SpawnWorktreeRequest, options?: SpawnOptions): Promise<WorktreeRecord>;
|
|
25
25
|
close(context: WorktreeContext, id: string, force: boolean): Promise<WorktreeRecord>;
|
|
26
26
|
list(context: WorktreeContext): Promise<WorktreeRecord[]>;
|
|
@@ -34,5 +34,4 @@ interface WorktreeOperations {
|
|
|
34
34
|
messages(context: WorktreeContext, id: string): Promise<WorktreeMessage[]>;
|
|
35
35
|
}
|
|
36
36
|
//#endregion
|
|
37
|
-
export { SpawnOptions, SpawnWorktreeRequest, WorktreeContext, WorktreeOperations };
|
|
38
37
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/worktreeOperations/index.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/worktreeOperations/index.ts"],"mappings":";;;;;iBAeiB;;EAEf;;EAEA;;iBAGe;EACf;EACA;EACA;;iBAGe;;EAEf,SAAS;;EAET,cAAc;;iBAGC;EACf,MAAM,SAAS,iBAAiB,SAAS,sBAAsB,UAAU,eAAe,QAAQ;EAChG,MAAM,SAAS,iBAAiB,YAAY,iBAAiB,QAAQ;EACrE,KAAK,SAAS,kBAAkB,QAAQ;EACxC,OAAO,SAAS,iBAAiB,aAAa;IAAU,QAAQ;IAAgB;;EAChF,MAAM,SAAS,iBAAiB,YAAY,mBAAmB,QAAQ;EACvE,MAAM,SAAS,iBAAiB,kBAAkB,QAAQ,kBAAkB;EAC5E,KAAK,SAAS,iBAAiB,YAAY,kBAAkB;EAC7D,SAAS,SAAS,iBAAiB,aAAa,QAA9B"}
|
|
@@ -3,24 +3,24 @@ import { WorktreeRecord } from "../../types/worktreeRegistry.mjs";
|
|
|
3
3
|
import { planPrune } from "../worktreeNaming/index.mjs";
|
|
4
4
|
import "@agimon-ai/doompi-core/hub-channel";
|
|
5
5
|
//#region src/services/worktreeOperations/index.d.ts
|
|
6
|
-
interface WorktreeContext {
|
|
6
|
+
export interface WorktreeContext {
|
|
7
7
|
/** Where the calling session is working, used to find the repository. */
|
|
8
8
|
cwd: string;
|
|
9
9
|
/** The calling session, recorded as the new session's parent. */
|
|
10
10
|
sessionId: string;
|
|
11
11
|
}
|
|
12
|
-
interface SpawnWorktreeRequest {
|
|
12
|
+
export interface SpawnWorktreeRequest {
|
|
13
13
|
branch: string;
|
|
14
14
|
baseRef?: string;
|
|
15
15
|
name?: string;
|
|
16
16
|
}
|
|
17
|
-
interface SpawnOptions {
|
|
17
|
+
export interface SpawnOptions {
|
|
18
18
|
/** Aborted when the caller gives up, so a spawn nobody is waiting for stops. */
|
|
19
19
|
signal?: AbortSignal;
|
|
20
20
|
/** Phase labels, for a caller that can show them while the work runs. */
|
|
21
21
|
onProgress?: (label: string) => void;
|
|
22
22
|
}
|
|
23
|
-
interface WorktreeOperations {
|
|
23
|
+
export interface WorktreeOperations {
|
|
24
24
|
spawn(context: WorktreeContext, request: SpawnWorktreeRequest, options?: SpawnOptions): Promise<WorktreeRecord>;
|
|
25
25
|
close(context: WorktreeContext, id: string, force: boolean): Promise<WorktreeRecord>;
|
|
26
26
|
list(context: WorktreeContext): Promise<WorktreeRecord[]>;
|
|
@@ -34,5 +34,4 @@ interface WorktreeOperations {
|
|
|
34
34
|
messages(context: WorktreeContext, id: string): Promise<WorktreeMessage[]>;
|
|
35
35
|
}
|
|
36
36
|
//#endregion
|
|
37
|
-
export { SpawnOptions, SpawnWorktreeRequest, WorktreeContext, WorktreeOperations };
|
|
38
37
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/services/worktreeOperations/index.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/services/worktreeOperations/index.ts"],"mappings":";;;;;iBAeiB;;EAEf;;EAEA;;iBAGe;EACf;EACA;EACA;;iBAGe;;EAEf,SAAS;;EAET,cAAc;;iBAGC;EACf,MAAM,SAAS,iBAAiB,SAAS,sBAAsB,UAAU,eAAe,QAAQ;EAChG,MAAM,SAAS,iBAAiB,YAAY,iBAAiB,QAAQ;EACrE,KAAK,SAAS,kBAAkB,QAAQ;EACxC,OAAO,SAAS,iBAAiB,aAAa;IAAU,QAAQ;IAAgB;;EAChF,MAAM,SAAS,iBAAiB,YAAY,mBAAmB,QAAQ;EACvE,MAAM,SAAS,iBAAiB,kBAAkB,QAAQ,kBAAkB;EAC5E,KAAK,SAAS,iBAAiB,YAAY,kBAAkB;EAC7D,SAAS,SAAS,iBAAiB,aAAa,QAA9B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../schemas/runWorktreeTool.cjs"),t=require("../services/runWorktree/index.cjs");function n(n){return{name:t.RUN_WORKTREE_TOOL_NAME,label:`Worktree`,description:t.RUN_WORKTREE_DESCRIPTION,parameters:e.
|
|
1
|
+
const e=require("../schemas/runWorktreeTool.cjs"),t=require("../services/runWorktree/index.cjs");function n(n){return{name:t.RUN_WORKTREE_TOOL_NAME,label:`Worktree`,description:t.RUN_WORKTREE_DESCRIPTION,parameters:e.RunWorktreeToolSchema,prepareArguments:t.validateParams,execute:async(e,r,i,a,o)=>{let s=t.validateParams(r);return await t.executeRunWorktreeTool(s,n,{cwd:o.cwd,sessionId:o.sessionManager.getSessionId()},{...i===void 0?{}:{signal:i},onProgress:e=>a?.({content:[{type:`text`,text:e}],details:{action:s.action}})})}}}exports.RUN_WORKTREE_TOOL_NAME=t.RUN_WORKTREE_TOOL_NAME,exports.createRunWorktreeTool=n,exports.validateParams=t.validateParams;
|
|
2
2
|
//# sourceMappingURL=runWorktree.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runWorktree.cjs","names":["RUN_WORKTREE_TOOL_NAME","RUN_WORKTREE_DESCRIPTION","
|
|
1
|
+
{"version":3,"file":"runWorktree.cjs","names":["RUN_WORKTREE_TOOL_NAME","RUN_WORKTREE_DESCRIPTION","RunWorktreeToolSchema","validateParams","executeRunWorktreeTool"],"sources":["../../src/tools/runWorktree.ts"],"sourcesContent":["import type { AgentToolResult } from '@earendil-works/pi-agent-core';\nimport type { ToolDefinition } from '@earendil-works/pi-coding-agent';\n\nimport { RunWorktreeToolSchema, type RunWorktreeToolParams } from '../schemas/runWorktreeTool';\nimport {\n executeRunWorktreeTool,\n RUN_WORKTREE_DESCRIPTION,\n RUN_WORKTREE_TOOL_NAME,\n validateParams,\n type RunWorktreeToolDetails,\n} from '../services/runWorktree';\nimport type { WorktreeOperations } from '../services/worktreeOperations';\n\nexport { RUN_WORKTREE_TOOL_NAME, validateParams };\nexport type { RunWorktreeToolDetails };\n\n/** Creates the typed Pi worktree tool declaration. */\nexport function createRunWorktreeTool(\n operations: WorktreeOperations,\n): ToolDefinition<typeof RunWorktreeToolSchema, RunWorktreeToolDetails> {\n const tool: ToolDefinition<typeof RunWorktreeToolSchema, RunWorktreeToolDetails> = {\n name: RUN_WORKTREE_TOOL_NAME,\n label: 'Worktree',\n description: RUN_WORKTREE_DESCRIPTION,\n parameters: RunWorktreeToolSchema,\n prepareArguments: validateParams,\n // The signal and the progress callback are the host's two answers to a\n // call that takes minutes. Dropping them is what let an interrupted spawn\n // run on with nobody waiting for it, and left the caller staring at\n // nothing while it did.\n execute: async (_id, rawParams, signal, onUpdate, ctx) => {\n const params = validateParams(rawParams) as RunWorktreeToolParams;\n return (await executeRunWorktreeTool(\n params,\n operations,\n {\n cwd: ctx.cwd,\n sessionId: ctx.sessionManager.getSessionId(),\n },\n {\n ...(signal === undefined ? {} : { signal }),\n onProgress: (label) =>\n onUpdate?.({ content: [{ type: 'text', text: label }], details: { action: params.action } }),\n },\n )) as AgentToolResult<RunWorktreeToolDetails>;\n },\n };\n return tool;\n}\n"],"mappings":"iGAiBA,SAAgB,EACd,EACsE,CA4BtE,MAAO,CA1BL,KAAMA,EAAAA,uBACN,MAAO,WACP,YAAaC,EAAAA,yBACb,WAAYC,EAAAA,sBACZ,iBAAkBC,EAAAA,eAKlB,QAAS,MAAO,EAAK,EAAW,EAAQ,EAAU,IAAQ,CACxD,IAAM,EAASA,EAAAA,eAAe,CAAS,EACvC,OAAQ,MAAMC,EAAAA,uBACZ,EACA,EACA,CACE,IAAK,EAAI,IACT,UAAW,EAAI,eAAe,aAAa,CAC7C,EACA,CACE,GAAI,IAAW,IAAA,GAAY,CAAC,EAAI,CAAE,QAAO,EACzC,WAAa,GACX,IAAW,CAAE,QAAS,CAAC,CAAE,KAAM,OAAQ,KAAM,CAAM,CAAC,EAAG,QAAS,CAAE,OAAQ,EAAO,MAAO,CAAE,CAAC,CAC/F,CACF,CACF,CAEQ,CACZ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{RunWorktreeToolSchema as e}from"../schemas/runWorktreeTool.mjs";import{RUN_WORKTREE_DESCRIPTION as t,RUN_WORKTREE_TOOL_NAME as n,executeRunWorktreeTool as r,validateParams as i}from"../services/runWorktree/index.mjs";function a(a){return{name:n,label:`Worktree`,description:t,parameters:e,prepareArguments:i,execute:async(e,t,n,o,s)=>{let c=i(t);return await r(c,a,{cwd:s.cwd,sessionId:s.sessionManager.getSessionId()},{...n===void 0?{}:{signal:n},onProgress:e=>o?.({content:[{type:`text`,text:e}],details:{action:c.action}})})}}}export{n as RUN_WORKTREE_TOOL_NAME,a as createRunWorktreeTool,i as validateParams};
|
|
2
2
|
//# sourceMappingURL=runWorktree.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runWorktree.mjs","names":[],"sources":["../../src/tools/runWorktree.ts"],"sourcesContent":["import type { AgentToolResult } from '@earendil-works/pi-agent-core';\nimport type { ToolDefinition } from '@earendil-works/pi-coding-agent';\n\nimport {
|
|
1
|
+
{"version":3,"file":"runWorktree.mjs","names":[],"sources":["../../src/tools/runWorktree.ts"],"sourcesContent":["import type { AgentToolResult } from '@earendil-works/pi-agent-core';\nimport type { ToolDefinition } from '@earendil-works/pi-coding-agent';\n\nimport { RunWorktreeToolSchema, type RunWorktreeToolParams } from '../schemas/runWorktreeTool';\nimport {\n executeRunWorktreeTool,\n RUN_WORKTREE_DESCRIPTION,\n RUN_WORKTREE_TOOL_NAME,\n validateParams,\n type RunWorktreeToolDetails,\n} from '../services/runWorktree';\nimport type { WorktreeOperations } from '../services/worktreeOperations';\n\nexport { RUN_WORKTREE_TOOL_NAME, validateParams };\nexport type { RunWorktreeToolDetails };\n\n/** Creates the typed Pi worktree tool declaration. */\nexport function createRunWorktreeTool(\n operations: WorktreeOperations,\n): ToolDefinition<typeof RunWorktreeToolSchema, RunWorktreeToolDetails> {\n const tool: ToolDefinition<typeof RunWorktreeToolSchema, RunWorktreeToolDetails> = {\n name: RUN_WORKTREE_TOOL_NAME,\n label: 'Worktree',\n description: RUN_WORKTREE_DESCRIPTION,\n parameters: RunWorktreeToolSchema,\n prepareArguments: validateParams,\n // The signal and the progress callback are the host's two answers to a\n // call that takes minutes. Dropping them is what let an interrupted spawn\n // run on with nobody waiting for it, and left the caller staring at\n // nothing while it did.\n execute: async (_id, rawParams, signal, onUpdate, ctx) => {\n const params = validateParams(rawParams) as RunWorktreeToolParams;\n return (await executeRunWorktreeTool(\n params,\n operations,\n {\n cwd: ctx.cwd,\n sessionId: ctx.sessionManager.getSessionId(),\n },\n {\n ...(signal === undefined ? {} : { signal }),\n onProgress: (label) =>\n onUpdate?.({ content: [{ type: 'text', text: label }], details: { action: params.action } }),\n },\n )) as AgentToolResult<RunWorktreeToolDetails>;\n },\n };\n return tool;\n}\n"],"mappings":"gOAiBA,SAAgB,EACd,EACsE,CA4BtE,MAAO,CA1BL,KAAM,EACN,MAAO,WACP,YAAa,EACb,WAAY,EACZ,iBAAkB,EAKlB,QAAS,MAAO,EAAK,EAAW,EAAQ,EAAU,IAAQ,CACxD,IAAM,EAAS,EAAe,CAAS,EACvC,OAAQ,MAAM,EACZ,EACA,EACA,CACE,IAAK,EAAI,IACT,UAAW,EAAI,eAAe,aAAa,CAC7C,EACA,CACE,GAAI,IAAW,IAAA,GAAY,CAAC,EAAI,CAAE,QAAO,EACzC,WAAa,GACX,IAAW,CAAE,QAAS,CAAC,CAAE,KAAM,OAAQ,KAAM,CAAM,CAAC,EAAG,QAAS,CAAE,OAAQ,EAAO,MAAO,CAAE,CAAC,CAC/F,CACF,CACF,CAEQ,CACZ"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { WorktreeOperations } from "../services/worktreeOperations/index.cjs";
|
|
2
2
|
//#region src/types/extension.d.ts
|
|
3
|
-
type GitNotificationLevel = 'info';
|
|
4
|
-
interface GitExtensionResult {
|
|
3
|
+
export type GitNotificationLevel = 'info';
|
|
4
|
+
export interface GitExtensionResult {
|
|
5
5
|
message: string;
|
|
6
6
|
level: GitNotificationLevel;
|
|
7
7
|
}
|
|
8
|
-
interface GitExtensionService {
|
|
8
|
+
export interface GitExtensionService {
|
|
9
9
|
execute(): Promise<GitExtensionResult>;
|
|
10
10
|
}
|
|
11
|
-
interface GitExtensionDependencies {
|
|
11
|
+
export interface GitExtensionDependencies {
|
|
12
12
|
service: GitExtensionService;
|
|
13
13
|
operations: WorktreeOperations;
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
|
-
export { GitExtensionDependencies, GitExtensionResult, GitExtensionService, GitNotificationLevel };
|
|
17
16
|
//# sourceMappingURL=extension.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.cts","names":[],"sources":["../../src/types/extension.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"extension.d.cts","names":[],"sources":["../../src/types/extension.ts"],"mappings":";;YAGY;iBAEK;EACf;EACA,OAAO;;iBAGQ;EACf,WAAW,QAAQ;;iBAGJ;EACf,SAAS;EACT,YAAY"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { WorktreeOperations } from "../services/worktreeOperations/index.mjs";
|
|
2
2
|
//#region src/types/extension.d.ts
|
|
3
|
-
type GitNotificationLevel = 'info';
|
|
4
|
-
interface GitExtensionResult {
|
|
3
|
+
export type GitNotificationLevel = 'info';
|
|
4
|
+
export interface GitExtensionResult {
|
|
5
5
|
message: string;
|
|
6
6
|
level: GitNotificationLevel;
|
|
7
7
|
}
|
|
8
|
-
interface GitExtensionService {
|
|
8
|
+
export interface GitExtensionService {
|
|
9
9
|
execute(): Promise<GitExtensionResult>;
|
|
10
10
|
}
|
|
11
|
-
interface GitExtensionDependencies {
|
|
11
|
+
export interface GitExtensionDependencies {
|
|
12
12
|
service: GitExtensionService;
|
|
13
13
|
operations: WorktreeOperations;
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
|
-
export { GitExtensionDependencies, GitExtensionResult, GitExtensionService, GitNotificationLevel };
|
|
17
16
|
//# sourceMappingURL=extension.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.mts","names":[],"sources":["../../src/types/extension.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"extension.d.mts","names":[],"sources":["../../src/types/extension.ts"],"mappings":";;YAGY;iBAEK;EACf;EACA,OAAO;;iBAGQ;EACf,WAAW,QAAQ;;iBAGJ;EACf,SAAS;EACT,YAAY"}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* directory has vanished, but the worktree may still hold uncommitted work, so
|
|
15
15
|
* the record is kept until someone decides what to do with it.
|
|
16
16
|
*/
|
|
17
|
-
type WorktreeStatus = 'spawning' | 'running' | 'closing' | 'orphaned';
|
|
18
|
-
declare const WORKTREE_RECORD_VERSION = 1;
|
|
19
|
-
interface WorktreeRecord {
|
|
17
|
+
export type WorktreeStatus = 'spawning' | 'running' | 'closing' | 'orphaned';
|
|
18
|
+
export declare const WORKTREE_RECORD_VERSION = 1;
|
|
19
|
+
export interface WorktreeRecord {
|
|
20
20
|
version: typeof WORKTREE_RECORD_VERSION;
|
|
21
21
|
/** This registry's own id, distinct from the session id, and stable across restarts. */
|
|
22
22
|
id: string;
|
|
@@ -37,5 +37,4 @@ interface WorktreeRecord {
|
|
|
37
37
|
createdAt: string;
|
|
38
38
|
}
|
|
39
39
|
//#endregion
|
|
40
|
-
export { WORKTREE_RECORD_VERSION, WorktreeRecord, WorktreeStatus };
|
|
41
40
|
//# sourceMappingURL=worktreeRegistry.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktreeRegistry.d.cts","names":[],"sources":["../../src/types/worktreeRegistry.ts"],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"worktreeRegistry.d.cts","names":[],"sources":["../../src/types/worktreeRegistry.ts"],"mappings":";;;;;;;;;;;;;;;;YAgBY;qBAEC;iBAEI;EACf,gBAAgB;;EAEhB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;EACA,QAAQ;;EAER"}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* directory has vanished, but the worktree may still hold uncommitted work, so
|
|
15
15
|
* the record is kept until someone decides what to do with it.
|
|
16
16
|
*/
|
|
17
|
-
type WorktreeStatus = 'spawning' | 'running' | 'closing' | 'orphaned';
|
|
18
|
-
declare const WORKTREE_RECORD_VERSION = 1;
|
|
19
|
-
interface WorktreeRecord {
|
|
17
|
+
export type WorktreeStatus = 'spawning' | 'running' | 'closing' | 'orphaned';
|
|
18
|
+
export declare const WORKTREE_RECORD_VERSION = 1;
|
|
19
|
+
export interface WorktreeRecord {
|
|
20
20
|
version: typeof WORKTREE_RECORD_VERSION;
|
|
21
21
|
/** This registry's own id, distinct from the session id, and stable across restarts. */
|
|
22
22
|
id: string;
|
|
@@ -37,5 +37,4 @@ interface WorktreeRecord {
|
|
|
37
37
|
createdAt: string;
|
|
38
38
|
}
|
|
39
39
|
//#endregion
|
|
40
|
-
export { WORKTREE_RECORD_VERSION, WorktreeRecord, WorktreeStatus };
|
|
41
40
|
//# sourceMappingURL=worktreeRegistry.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktreeRegistry.d.mts","names":[],"sources":["../../src/types/worktreeRegistry.ts"],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"worktreeRegistry.d.mts","names":[],"sources":["../../src/types/worktreeRegistry.ts"],"mappings":";;;;;;;;;;;;;;;;YAgBY;qBAEC;iBAEI;EACf,gBAAgB;;EAEhB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;EACA,QAAQ;;EAER"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/doompi-git",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.8",
|
|
4
4
|
"description": "Git worktree sessions for DoomPi: spawn an isolated worktree with its own session and manage it from the parent",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -63,25 +63,25 @@
|
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
+
"@agimon-ai/doompi-core": "0.0.1-alpha.72",
|
|
67
|
+
"@agimon-ai/doompi-web-components": "0.0.1-alpha.30",
|
|
66
68
|
"@deepseek-ai/cordis": "4.0.2",
|
|
67
69
|
"@tanstack/react-store": "0.11.1",
|
|
68
70
|
"@tanstack/store": "0.11.1",
|
|
69
|
-
"typebox": "1.3.
|
|
70
|
-
"@agimon-ai/doompi-web-components": "0.0.1-alpha.29",
|
|
71
|
-
"@agimon-ai/doompi-core": "0.0.1-alpha.70"
|
|
71
|
+
"typebox": "1.3.30"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
+
"@agimon-ai/vibe-lint-plugin-doom-extension": "0.0.1-alpha.67",
|
|
74
75
|
"@earendil-works/pi-agent-core": "0.85.1",
|
|
75
76
|
"@earendil-works/pi-coding-agent": "0.85.1",
|
|
76
|
-
"@types/node": "26.
|
|
77
|
-
"@types/react": "19.
|
|
77
|
+
"@types/node": "26.5.1",
|
|
78
|
+
"@types/react": "19.3.0",
|
|
78
79
|
"@vitest/coverage-v8": "5.0.0",
|
|
79
|
-
"react": "19.
|
|
80
|
-
"react-dom": "19.
|
|
81
|
-
"tsdown": "0.
|
|
80
|
+
"react": "19.3.0",
|
|
81
|
+
"react-dom": "19.3.0",
|
|
82
|
+
"tsdown": "0.23.0",
|
|
82
83
|
"typescript": "7.0.2",
|
|
83
|
-
"vitest": "5.0.0"
|
|
84
|
-
"@agimon-ai/vibe-lint-plugin-doom-extension": "0.0.1-alpha.66"
|
|
84
|
+
"vitest": "5.0.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"@earendil-works/pi-agent-core": "0.85.1",
|