@autonav/core 1.7.0 → 1.9.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 (62) hide show
  1. package/dist/adapter/navigator-adapter.d.ts.map +1 -1
  2. package/dist/adapter/navigator-adapter.js +2 -4
  3. package/dist/adapter/navigator-adapter.js.map +1 -1
  4. package/dist/cli/nav-chat.d.ts.map +1 -1
  5. package/dist/cli/nav-chat.js +3 -1
  6. package/dist/cli/nav-chat.js.map +1 -1
  7. package/dist/cli/nav-init.d.ts.map +1 -1
  8. package/dist/cli/nav-init.js +0 -1
  9. package/dist/cli/nav-init.js.map +1 -1
  10. package/dist/conversation/App.d.ts +3 -1
  11. package/dist/conversation/App.d.ts.map +1 -1
  12. package/dist/conversation/App.js +2 -2
  13. package/dist/conversation/App.js.map +1 -1
  14. package/dist/conversation/index.d.ts +2 -0
  15. package/dist/conversation/index.d.ts.map +1 -1
  16. package/dist/conversation/index.js.map +1 -1
  17. package/dist/conversation/prompts.d.ts +1 -1
  18. package/dist/conversation/prompts.d.ts.map +1 -1
  19. package/dist/conversation/prompts.js +42 -1
  20. package/dist/conversation/prompts.js.map +1 -1
  21. package/dist/harness/claude-code-harness.d.ts.map +1 -1
  22. package/dist/harness/claude-code-harness.js +5 -14
  23. package/dist/harness/claude-code-harness.js.map +1 -1
  24. package/dist/harness/types.d.ts +0 -2
  25. package/dist/harness/types.d.ts.map +1 -1
  26. package/dist/interview/prompts.d.ts +1 -3
  27. package/dist/interview/prompts.d.ts.map +1 -1
  28. package/dist/interview/prompts.js +10 -4
  29. package/dist/interview/prompts.js.map +1 -1
  30. package/dist/memento/loop.d.ts.map +1 -1
  31. package/dist/memento/loop.js +0 -4
  32. package/dist/memento/loop.js.map +1 -1
  33. package/dist/standup/loop.d.ts +0 -2
  34. package/dist/standup/loop.d.ts.map +1 -1
  35. package/dist/standup/loop.js +0 -20
  36. package/dist/standup/loop.js.map +1 -1
  37. package/dist/standup/types.d.ts +8 -8
  38. package/package.json +4 -4
  39. package/dist/adapter/claude-adapter.d.ts +0 -189
  40. package/dist/adapter/claude-adapter.d.ts.map +0 -1
  41. package/dist/adapter/claude-adapter.js +0 -541
  42. package/dist/adapter/claude-adapter.js.map +0 -1
  43. package/dist/memento/worker-agent.d.ts +0 -33
  44. package/dist/memento/worker-agent.d.ts.map +0 -1
  45. package/dist/memento/worker-agent.js +0 -93
  46. package/dist/memento/worker-agent.js.map +0 -1
  47. package/dist/skill-generator/index.d.ts +0 -142
  48. package/dist/skill-generator/index.d.ts.map +0 -1
  49. package/dist/skill-generator/index.js +0 -510
  50. package/dist/skill-generator/index.js.map +0 -1
  51. package/dist/templates/.gitignore.template +0 -26
  52. package/dist/templates/CLAUDE-pack.md.template +0 -114
  53. package/dist/templates/CLAUDE.md.template +0 -153
  54. package/dist/templates/README.md.template +0 -174
  55. package/dist/templates/config-pack.json.template +0 -16
  56. package/dist/templates/config.json.template +0 -11
  57. package/dist/templates/index.d.ts +0 -22
  58. package/dist/templates/index.d.ts.map +0 -1
  59. package/dist/templates/index.js +0 -32
  60. package/dist/templates/index.js.map +0 -1
  61. package/dist/templates/plugins.json.template +0 -33
  62. package/dist/templates/system-configuration.md.template +0 -70
@@ -1,189 +0,0 @@
1
- import { NavigatorConfig, NavigatorResponse, type ValidationResult } from "@autonav/communication-layer";
2
- import { PluginManager } from "../plugins/index.js";
3
- /**
4
- * Configuration options for Claude Adapter
5
- */
6
- export interface ClaudeAdapterOptions {
7
- /**
8
- * Claude model to use (defaults to claude-sonnet-4-5)
9
- */
10
- model?: string;
11
- /**
12
- * Maximum turns for agentic loop
13
- *
14
- * The SDK's agentic loop continues until Claude naturally stops responding,
15
- * or until this limit is reached. MCP tools cannot force early termination -
16
- * instead, we rely on the system prompt instructing Claude to stop after
17
- * calling submit_answer.
18
- *
19
- * In practice, Claude typically stops within 0-2 turns after calling submit_answer,
20
- * often stopping immediately on the same turn. This parameter serves as a safety
21
- * limit to prevent runaway execution in edge cases (e.g., if Claude ignores the
22
- * stop instruction or enters an unexpected loop).
23
- *
24
- * @default 50
25
- */
26
- maxTurns?: number;
27
- }
28
- /**
29
- * Loaded navigator with all necessary context
30
- */
31
- export interface LoadedNavigator {
32
- config: NavigatorConfig;
33
- systemPrompt: string;
34
- navigatorPath: string;
35
- knowledgeBasePath: string;
36
- pluginManager?: PluginManager;
37
- pluginsConfigPath?: string;
38
- }
39
- /**
40
- * Query options
41
- */
42
- export interface QueryOptions {
43
- /**
44
- * Enable self-configuration tools (defaults to true)
45
- */
46
- enableSelfConfig?: boolean;
47
- /**
48
- * Maximum turns for agentic loop
49
- *
50
- * The SDK's agentic loop continues until Claude naturally stops responding,
51
- * or until this limit is reached. MCP tools cannot force early termination -
52
- * instead, we rely on the system prompt instructing Claude to stop after
53
- * calling submit_answer.
54
- *
55
- * In practice, Claude typically stops within 0-2 turns after calling submit_answer,
56
- * often stopping immediately on the same turn. This parameter serves as a safety
57
- * limit to prevent runaway execution in edge cases (e.g., if Claude ignores the
58
- * stop instruction or enters an unexpected loop).
59
- *
60
- * @default 50
61
- */
62
- maxTurns?: number;
63
- }
64
- /**
65
- * Claude Agent SDK Adapter
66
- *
67
- * Bridges Claude Agent SDK to the Communication Layer protocol.
68
- * Loads navigators, executes queries, and validates responses.
69
- *
70
- * @example
71
- * ```typescript
72
- * const adapter = new ClaudeAdapter({
73
- * model: 'claude-sonnet-4-5'
74
- * });
75
- *
76
- * const navigator = adapter.loadNavigator('./my-navigator');
77
- * const response = await adapter.query(navigator, 'How do I deploy?');
78
- * ```
79
- */
80
- export declare class ClaudeAdapter {
81
- private readonly options;
82
- /**
83
- * Create a new Claude Adapter
84
- *
85
- * @param options - Configuration options
86
- */
87
- constructor(options?: ClaudeAdapterOptions);
88
- /**
89
- * Load a navigator from a directory
90
- *
91
- * Reads and validates config.json and CLAUDE.md (or custom instructions file).
92
- * Verifies that the knowledge base directory exists.
93
- * If .claude/plugins.json exists, initializes configured plugins.
94
- *
95
- * @param navigatorPath - Path to the navigator directory
96
- * @returns Loaded navigator with config, system prompt, paths, and optional plugin manager
97
- * @throws {Error} If directory doesn't exist, config is invalid, or required files are missing
98
- *
99
- * @example
100
- * ```typescript
101
- * const adapter = new ClaudeAdapter();
102
- * const navigator = await adapter.loadNavigator('./my-navigator');
103
- * console.log(`Loaded: ${navigator.config.name}`);
104
- * ```
105
- */
106
- loadNavigator(navigatorPath: string): Promise<LoadedNavigator>;
107
- /**
108
- * Execute a query using Claude Agent SDK
109
- *
110
- * Sends the question to Claude with the navigator's system prompt,
111
- * handles tool use via the built-in agentic loop, parses the response,
112
- * and validates it against the knowledge base.
113
- *
114
- * @param navigator - Loaded navigator to query
115
- * @param question - Question to ask
116
- * @param options - Query options (enableSelfConfig, maxTurns)
117
- * @returns Validated navigator response with answer and sources
118
- * @throws {Error} If API call fails, response parsing fails, or validation fails
119
- *
120
- * @example
121
- * ```typescript
122
- * const response = await adapter.query(navigator, 'How do I deploy?');
123
- * console.log(response.answer);
124
- * console.log(`Confidence: ${response.confidence}`);
125
- * console.log(`Sources: ${response.sources.map(s => s.filePath).join(', ')}`);
126
- * ```
127
- */
128
- query(navigator: LoadedNavigator, question: string, options?: QueryOptions): Promise<NavigatorResponse>;
129
- /**
130
- * Internal method to execute the query
131
- * Separated to allow for LangSmith tracing wrapper
132
- *
133
- * @internal
134
- */
135
- private executeQuery;
136
- /**
137
- * Update navigator documentation
138
- *
139
- * Sends an update message to Claude with write permissions enabled.
140
- * Claude can edit files in the knowledge base to document progress,
141
- * add troubleshooting steps, or update existing documentation.
142
- *
143
- * @param navigator - Loaded navigator to update
144
- * @param message - Update message or report
145
- * @param options - Query options (maxTurns)
146
- * @returns Text response from Claude describing what was updated
147
- * @throws {Error} If API call fails or update fails
148
- *
149
- * @example
150
- * ```typescript
151
- * const result = await adapter.update(
152
- * navigator,
153
- * 'I completed feature X. Please document this in the knowledge base.'
154
- * );
155
- * console.log(result);
156
- * ```
157
- */
158
- update(navigator: LoadedNavigator, message: string, options?: QueryOptions): Promise<string>;
159
- /**
160
- * Parse Claude's response into a NavigatorResponse
161
- *
162
- * Extracts JSON from the response text (either from code blocks or raw JSON)
163
- * and validates it against the NavigatorResponseSchema.
164
- *
165
- * @param rawResponse - Raw text response from Claude
166
- * @param query - Original query (used to populate missing query field)
167
- * @returns Parsed and validated NavigatorResponse
168
- * @throws {Error} If JSON cannot be extracted or schema validation fails
169
- *
170
- * @internal
171
- */
172
- parseResponse(rawResponse: string, query: string): NavigatorResponse;
173
- /**
174
- * Validate a NavigatorResponse
175
- *
176
- * Runs comprehensive validation including:
177
- * - Source file existence checks
178
- * - Hallucination pattern detection
179
- * - Confidence level validation
180
- *
181
- * @param response - Navigator response to validate
182
- * @param knowledgeBasePath - Path to knowledge base directory
183
- * @returns Validation result with errors and warnings
184
- *
185
- * @internal
186
- */
187
- validate(response: NavigatorResponse, knowledgeBasePath: string): ValidationResult;
188
- }
189
- //# sourceMappingURL=claude-adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"claude-adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/claude-adapter.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,EAEf,iBAAiB,EAKjB,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAuB,aAAa,EAA0B,MAAM,qBAAqB,CAAC;AAiDjG;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,eAAe,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;C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