@autonav/core 1.7.0 → 1.8.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.
Files changed (44) hide show
  1. package/dist/cli/nav-chat.d.ts.map +1 -1
  2. package/dist/cli/nav-chat.js +3 -1
  3. package/dist/cli/nav-chat.js.map +1 -1
  4. package/dist/conversation/App.d.ts +3 -1
  5. package/dist/conversation/App.d.ts.map +1 -1
  6. package/dist/conversation/App.js +2 -2
  7. package/dist/conversation/App.js.map +1 -1
  8. package/dist/conversation/index.d.ts +2 -0
  9. package/dist/conversation/index.d.ts.map +1 -1
  10. package/dist/conversation/index.js.map +1 -1
  11. package/dist/conversation/prompts.d.ts +1 -1
  12. package/dist/conversation/prompts.d.ts.map +1 -1
  13. package/dist/conversation/prompts.js +42 -1
  14. package/dist/conversation/prompts.js.map +1 -1
  15. package/dist/interview/prompts.d.ts +1 -1
  16. package/dist/interview/prompts.d.ts.map +1 -1
  17. package/dist/interview/prompts.js +9 -0
  18. package/dist/interview/prompts.js.map +1 -1
  19. package/dist/standup/types.d.ts +8 -8
  20. package/package.json +4 -4
  21. package/dist/adapter/claude-adapter.d.ts +0 -189
  22. package/dist/adapter/claude-adapter.d.ts.map +0 -1
  23. package/dist/adapter/claude-adapter.js +0 -541
  24. package/dist/adapter/claude-adapter.js.map +0 -1
  25. package/dist/memento/worker-agent.d.ts +0 -33
  26. package/dist/memento/worker-agent.d.ts.map +0 -1
  27. package/dist/memento/worker-agent.js +0 -93
  28. package/dist/memento/worker-agent.js.map +0 -1
  29. package/dist/skill-generator/index.d.ts +0 -142
  30. package/dist/skill-generator/index.d.ts.map +0 -1
  31. package/dist/skill-generator/index.js +0 -510
  32. package/dist/skill-generator/index.js.map +0 -1
  33. package/dist/templates/.gitignore.template +0 -26
  34. package/dist/templates/CLAUDE-pack.md.template +0 -114
  35. package/dist/templates/CLAUDE.md.template +0 -153
  36. package/dist/templates/README.md.template +0 -174
  37. package/dist/templates/config-pack.json.template +0 -16
  38. package/dist/templates/config.json.template +0 -11
  39. package/dist/templates/index.d.ts +0 -22
  40. package/dist/templates/index.d.ts.map +0 -1
  41. package/dist/templates/index.js +0 -32
  42. package/dist/templates/index.js.map +0 -1
  43. package/dist/templates/plugins.json.template +0 -33
  44. package/dist/templates/system-configuration.md.template +0 -70
@@ -1,93 +0,0 @@
1
- /**
2
- * Worker Agent for Memento Loop
3
- *
4
- * Executes implementation plans via the harness adapter.
5
- */
6
- import { buildWorkerPrompt, buildWorkerSystemPrompt } from "./prompts.js";
7
- import { ClaudeCodeHarness } from "../harness/index.js";
8
- /**
9
- * Run the worker agent to implement a plan
10
- */
11
- export async function runWorkerAgent(context, plan, options = {}) {
12
- const startTime = Date.now();
13
- const { verbose = false, model = "claude-sonnet-4-5", maxTurns = 50, harness = new ClaudeCodeHarness(), } = options;
14
- const prompt = buildWorkerPrompt(context.codeDirectory, plan);
15
- const systemPrompt = buildWorkerSystemPrompt(context.codeDirectory);
16
- if (verbose) {
17
- console.log("\n[Worker] Starting implementation...");
18
- console.log(`[Worker] Plan: ${plan.summary}`);
19
- console.log(`[Worker] Steps: ${plan.steps.length}`);
20
- }
21
- const filesModified = [];
22
- let lastAssistantText = "";
23
- try {
24
- const session = harness.run({
25
- model,
26
- maxTurns,
27
- systemPrompt,
28
- cwd: context.codeDirectory,
29
- permissionMode: "bypassPermissions",
30
- }, prompt);
31
- let success = false;
32
- let resultText = "";
33
- let errorText = "";
34
- for await (const event of session) {
35
- if (event.type === "tool_use") {
36
- if (verbose) {
37
- console.log(`[Worker] Tool: ${event.name}`);
38
- }
39
- // Extract file paths from common tools
40
- if (event.name === "Write" ||
41
- event.name === "Edit" ||
42
- event.name === "str_replace_based_edit_tool") {
43
- const filePath = event.input.file_path || event.input.path;
44
- if (typeof filePath === "string" && !filesModified.includes(filePath)) {
45
- filesModified.push(filePath);
46
- }
47
- }
48
- }
49
- else if (event.type === "text") {
50
- lastAssistantText = event.text;
51
- }
52
- else if (event.type === "result") {
53
- success = event.success;
54
- resultText = event.text || "";
55
- if (!event.success) {
56
- errorText = event.text || "Unknown error";
57
- }
58
- }
59
- }
60
- const durationMs = Date.now() - startTime;
61
- if (!success) {
62
- return {
63
- success: false,
64
- summary: errorText || "Worker failed",
65
- filesModified,
66
- errors: [errorText || "Unknown error"],
67
- durationMs,
68
- };
69
- }
70
- if (verbose) {
71
- console.log(`[Worker] Completed in ${durationMs}ms`);
72
- console.log(`[Worker] Files modified: ${filesModified.length}`);
73
- }
74
- return {
75
- success: true,
76
- summary: resultText || lastAssistantText || "Implementation completed",
77
- filesModified,
78
- durationMs,
79
- };
80
- }
81
- catch (error) {
82
- const durationMs = Date.now() - startTime;
83
- const errorMessage = error instanceof Error ? error.message : String(error);
84
- return {
85
- success: false,
86
- summary: `Worker error: ${errorMessage}`,
87
- filesModified,
88
- errors: [errorMessage],
89
- durationMs,
90
- };
91
- }
92
- }
93
- //# sourceMappingURL=worker-agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker-agent.js","sourceRoot":"","sources":["../../src/memento/worker-agent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAgB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AA2BtE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,OAAsB,EACtB,IAAwB,EACxB,UAA8B,EAAE;IAEhC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,MAAM,EACJ,OAAO,GAAG,KAAK,EACf,KAAK,GAAG,mBAAmB,EAC3B,QAAQ,GAAG,EAAE,EACb,OAAO,GAAG,IAAI,iBAAiB,EAAE,GAClC,GAAG,OAAO,CAAC;IAEZ,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAC9D,MAAM,YAAY,GAAG,u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AAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAE5E,OAAO;YACL,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,iBAAiB,YAAY,EAAE;YACxC,aAAa;YACb,MAAM,EAAE,CAAC,YAAY,CAAC;YACtB,UAAU;SACX,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,142 +0,0 @@
1
- /**
2
- * Skill Generator
3
- *
4
- * Generates Claude Code skills for navigators, enabling
5
- * inter-navigator communication via the "ask <navname>" pattern.
6
- *
7
- * Skills are stored locally in the navigator directory (.autonav/skills/)
8
- * and symlinked to the global skills directory (~/.claude/skills/) for
9
- * discovery by Claude Code.
10
- */
11
- export interface SkillConfig {
12
- /** Navigator name (used for skill name: ask-<navname>) */
13
- navigatorName: string;
14
- /** Absolute path to the navigator directory */
15
- navigatorPath: string;
16
- /** Navigator description/purpose */
17
- description: string;
18
- /** Topics the navigator covers */
19
- scope?: string;
20
- /** Who uses this navigator */
21
- audience?: string;
22
- }
23
- /**
24
- * Get the global skills directory path (~/.claude/skills/)
25
- */
26
- export declare function getGlobalSkillsDir(): string;
27
- /**
28
- * Get the local skills directory path for a navigator (.autonav/skills/)
29
- */
30
- export declare function getLocalSkillsDir(navigatorPath: string): string;
31
- /**
32
- * Get the full path to a local skill directory
33
- */
34
- export declare function getLocalSkillPath(navigatorPath: string, skillName: string): string;
35
- /**
36
- * Check if a skill already exists globally
37
- */
38
- export declare function skillExists(skillName: string): boolean;
39
- /**
40
- * Check if a skill exists locally in a navigator
41
- */
42
- export declare function localSkillExists(navigatorPath: string, skillName: string): boolean;
43
- /**
44
- * Check if a global skill is a symlink
45
- */
46
- export declare function isSkillSymlink(skillName: string): boolean;
47
- /**
48
- * Get the target of a global skill symlink
49
- */
50
- export declare function getSkillSymlinkTarget(skillName: string): string | null;
51
- /**
52
- * Generate the skill name from navigator name
53
- */
54
- export declare function getSkillName(navigatorName: string): string;
55
- /**
56
- * Generate the update skill name from navigator name
57
- */
58
- export declare function getUpdateSkillName(navigatorName: string): string;
59
- /**
60
- * Generate the SKILL.md content for a navigator
61
- */
62
- export declare function generateSkillContent(config: SkillConfig): string;
63
- /**
64
- * Generate the update skill content for a navigator (with write permissions)
65
- */
66
- export declare function generateUpdateSkillContent(config: SkillConfig): string;
67
- /**
68
- * Create a global skill for a navigator
69
- *
70
- * @param config - Skill configuration
71
- * @param options - Options for skill creation
72
- * @returns Path to the created skill directory, or null if skipped
73
- */
74
- export declare function createNavigatorSkill(config: SkillConfig, options?: {
75
- force?: boolean;
76
- quiet?: boolean;
77
- }): Promise<string | null>;
78
- /**
79
- * Remove a navigator skill (both ask and update skills, global only)
80
- */
81
- export declare function removeNavigatorSkill(navigatorName: string, options?: {
82
- quiet?: boolean;
83
- }): boolean;
84
- export interface SymlinkResult {
85
- success: boolean;
86
- action: "created" | "already_linked" | "conflict" | "error";
87
- message: string;
88
- skillName: string;
89
- localPath?: string;
90
- globalPath?: string;
91
- conflictTarget?: string;
92
- }
93
- /**
94
- * Create both ask and update skills locally in the navigator's .autonav/skills/ directory
95
- */
96
- export declare function createLocalSkill(navigatorPath: string, config: SkillConfig, options?: {
97
- force?: boolean;
98
- quiet?: boolean;
99
- }): Promise<{
100
- askSkillPath: string | null;
101
- updateSkillPath: string | null;
102
- }>;
103
- /**
104
- * Create a symlink from global skills directory to local skill
105
- *
106
- * @returns SymlinkResult with status and details
107
- */
108
- export declare function symlinkSkillToGlobal(localSkillPath: string, skillName: string, options?: {
109
- force?: boolean;
110
- quiet?: boolean;
111
- }): SymlinkResult;
112
- /**
113
- * Remove the global symlink for a skill (preserves local skill)
114
- */
115
- export declare function removeSkillSymlink(skillName: string, options?: {
116
- quiet?: boolean;
117
- }): {
118
- success: boolean;
119
- wasSymlink: boolean;
120
- message: string;
121
- };
122
- /**
123
- * Create both skills locally AND symlink them globally (recommended for new navigators)
124
- *
125
- * This is the preferred method for creating skills as it:
126
- * 1. Stores both ask and update skills in the navigator's .autonav/skills/ (version-controlled)
127
- * 2. Symlinks both to ~/.claude/skills/ for global discovery
128
- */
129
- export declare function createAndSymlinkSkill(navigatorPath: string, config: SkillConfig, options?: {
130
- force?: boolean;
131
- quiet?: boolean;
132
- }): Promise<{
133
- askSkillPath: string | null;
134
- updateSkillPath: string | null;
135
- askSymlinkResult: SymlinkResult | null;
136
- updateSymlinkResult: SymlinkResult | null;
137
- }>;
138
- /**
139
- * Discover all local skills in a navigator (both ask and update skills)
140
- */
141
- export declare function discoverLocalSkills(navigatorPath: string): string[];
142
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skill-generator/index.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AAEH,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,aAAa,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAElF;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAGtD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAGlF;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAA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