@kjerneverk/agentic 1.0.5-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.kodrdriv-test-cache.json +6 -0
- package/LICENSE +18 -0
- package/README.md +167 -0
- package/SECURITY.md +94 -0
- package/dist/index.d.ts +770 -0
- package/dist/index.js +1822 -0
- package/dist/index.js.map +1 -0
- package/output/kodrdriv/260110-1207-commit-message.md +1 -0
- package/output/kodrdriv/260110-1208-commit-message.md +1 -0
- package/output/kodrdriv/260110-1210-release-notes.md +27 -0
- package/output/kodrdriv/260110-1232-commit-message.md +1 -0
- package/output/kodrdriv/260110-1234-release-notes.md +46 -0
- package/output/kodrdriv/260110-1308-release-notes.md +20 -0
- package/output/kodrdriv/260112-2155-commit-message.md +1 -0
- package/output/kodrdriv/260112-2156-release-notes.md +33 -0
- package/output/kodrdriv/260112-2340-commit-message.md +1 -0
- package/output/kodrdriv/260113-0017-commit-message.md +1 -0
- package/output/kodrdriv/260113-0017-release-notes.md +53 -0
- package/output/kodrdriv/260115-0616-commit-message.md +4 -0
- package/output/kodrdriv/260115-0739-commit-message.md +1 -0
- package/output/kodrdriv/260115-0746-commit-message.md +1 -0
- package/output/kodrdriv/260115-0747-release-notes.md +91 -0
- package/output/kodrdriv/260126-0851-commit-message.md +1 -0
- package/output/kodrdriv/260128-0900-commit-message.md +1 -0
- package/output/kodrdriv/260128-0900-release-notes.md +29 -0
- package/output/kodrdriv/260128-0905-commit-message.md +1 -0
- package/output/kodrdriv/260128-0913-commit-message.md +1 -0
- package/output/kodrdriv/260128-0913-release-notes.md +23 -0
- package/output/kodrdriv/260128-0919-commit-message.md +1 -0
- package/output/kodrdriv/260128-0919-release-notes.md +21 -0
- package/output/kodrdriv/260130-1642-commit-message.md +1 -0
- package/output/kodrdriv/260130-1642-release-notes.md +29 -0
- package/output/kodrdriv/RELEASE_NOTES.md +27 -0
- package/output/kodrdriv/RELEASE_TITLE.md +1 -0
- package/output/kodrdriv/agentic-reflection-commit-2026-01-10T19-18-11-913Z.md +187 -0
- package/output/kodrdriv/agentic-reflection-commit-2026-01-10T20-03-27-409Z.md +121 -0
- package/output/kodrdriv/agentic-reflection-commit-2026-01-10T20-07-27-813Z.md +114 -0
- package/output/kodrdriv/agentic-reflection-commit-2026-01-10T20-08-06-279Z.md +97 -0
- package/output/kodrdriv/agentic-reflection-commit-2026-01-10T20-32-25-791Z.md +114 -0
- package/output/kodrdriv/agentic-reflection-commit-2026-01-13T05-55-30-733Z.md +97 -0
- package/output/kodrdriv/agentic-reflection-commit-2026-01-13T07-40-28-878Z.md +97 -0
- package/output/kodrdriv/agentic-reflection-commit-2026-01-13T08-17-22-230Z.md +114 -0
- package/output/kodrdriv/agentic-reflection-commit-2026-01-14T14-55-10-122Z.md +177 -0
- package/output/kodrdriv/agentic-reflection-commit-2026-01-15T14-16-05-605Z.md +100 -0
- package/output/kodrdriv/agentic-reflection-commit-2026-01-15T15-39-32-200Z.md +97 -0
- package/output/kodrdriv/agentic-reflection-commit-2026-01-15T15-46-32-840Z.md +114 -0
- package/output/kodrdriv/agentic-reflection-commit-2026-01-26T16-51-00-446Z.md +152 -0
- package/output/kodrdriv/agentic-reflection-commit-2026-01-31T00-38-59-868Z.md +236 -0
- package/output/kodrdriv/agentic-reflection-commit-2026-01-31T00-42-31-993Z.md +152 -0
- package/output/kodrdriv/agentic-reflection-release-2026-01-10T20-10-49-531Z.md +329 -0
- package/output/kodrdriv/agentic-reflection-release-2026-01-10T20-34-32-038Z.md +319 -0
- package/output/kodrdriv/agentic-reflection-release-2026-01-10T21-08-36-314Z.md +168 -0
- package/output/kodrdriv/agentic-reflection-release-2026-01-13T05-56-04-802Z.md +264 -0
- package/output/kodrdriv/agentic-reflection-release-2026-01-13T08-17-56-556Z.md +255 -0
- package/output/kodrdriv/agentic-reflection-release-2026-01-15T15-47-32-509Z.md +460 -0
- package/output/kodrdriv/agentic-reflection-release-2026-01-31T00-42-59-683Z.md +400 -0
- package/package.json +59 -0
- package/package.json~ +58 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
# Agentic Workflow - Self-Reflection Report
|
|
2
|
+
|
|
3
|
+
Generated: 2026-01-31T00:42:59.683Z
|
|
4
|
+
|
|
5
|
+
## Execution Summary
|
|
6
|
+
|
|
7
|
+
- **Iterations**: 8
|
|
8
|
+
- **Tool Calls**: 17
|
|
9
|
+
- **Unique Tools**: 11
|
|
10
|
+
|
|
11
|
+
## Tool Effectiveness Analysis
|
|
12
|
+
|
|
13
|
+
| Tool | Calls | Success | Failures | Success Rate | Avg Duration |
|
|
14
|
+
|------|-------|---------|----------|--------------|--------------|
|
|
15
|
+
| get_file_content | 4 | 4 | 0 | 100.0% | 1ms |
|
|
16
|
+
| search_codebase | 4 | 4 | 0 | 100.0% | 13ms |
|
|
17
|
+
| get_release_stats | 1 | 1 | 0 | 100.0% | 30ms |
|
|
18
|
+
| get_tag_history | 1 | 1 | 0 | 100.0% | 81ms |
|
|
19
|
+
| analyze_commit_patterns | 1 | 1 | 0 | 100.0% | 6ms |
|
|
20
|
+
| get_breaking_changes | 1 | 1 | 0 | 100.0% | 20ms |
|
|
21
|
+
| group_files_by_concern | 1 | 1 | 0 | 100.0% | 0ms |
|
|
22
|
+
| get_file_dependencies | 1 | 1 | 0 | 100.0% | 25ms |
|
|
23
|
+
| get_file_history | 1 | 1 | 0 | 100.0% | 11ms |
|
|
24
|
+
| compare_previous_release | 1 | 1 | 0 | 100.0% | 22ms |
|
|
25
|
+
| analyze_diff_section | 1 | 1 | 0 | 100.0% | 2ms |
|
|
26
|
+
|
|
27
|
+
### Tool Performance Insights
|
|
28
|
+
|
|
29
|
+
**Most Frequently Used:**
|
|
30
|
+
- get_release_stats: 1 calls
|
|
31
|
+
- get_tag_history: 1 calls
|
|
32
|
+
- analyze_commit_patterns: 1 calls
|
|
33
|
+
|
|
34
|
+
## Recommendations for Improvement
|
|
35
|
+
|
|
36
|
+
- **Underutilized Tools**: Many tools were called only once. Consider whether all tools are necessary or if the agent needs better guidance on when to use them.
|
|
37
|
+
|
|
38
|
+
## Detailed Execution Timeline
|
|
39
|
+
|
|
40
|
+
| Time | Iteration | Tool | Result | Duration |
|
|
41
|
+
|------|-----------|------|--------|----------|
|
|
42
|
+
| 4:42:35 PM | 1 | get_release_stats | ✅ Success | 30ms |
|
|
43
|
+
| 4:42:35 PM | 1 | get_tag_history | ✅ Success | 81ms |
|
|
44
|
+
| 4:42:35 PM | 1 | analyze_commit_patterns | ✅ Success | 6ms |
|
|
45
|
+
| 4:42:35 PM | 1 | get_breaking_changes | ✅ Success | 20ms |
|
|
46
|
+
| 4:42:37 PM | 2 | group_files_by_concern | ✅ Success | 0ms |
|
|
47
|
+
| 4:42:37 PM | 2 | get_file_content | ✅ Success | 0ms |
|
|
48
|
+
| 4:42:37 PM | 2 | get_file_content | ✅ Success | 1ms |
|
|
49
|
+
| 4:42:37 PM | 2 | get_file_content | ✅ Success | 0ms |
|
|
50
|
+
| 4:42:39 PM | 3 | get_file_dependencies | ✅ Success | 25ms |
|
|
51
|
+
| 4:42:39 PM | 3 | search_codebase | ✅ Success | 12ms |
|
|
52
|
+
| 4:42:39 PM | 3 | search_codebase | ✅ Success | 10ms |
|
|
53
|
+
| 4:42:39 PM | 3 | search_codebase | ✅ Success | 8ms |
|
|
54
|
+
| 4:42:41 PM | 4 | get_file_history | ✅ Success | 11ms |
|
|
55
|
+
| 4:42:41 PM | 4 | compare_previous_release | ✅ Success | 22ms |
|
|
56
|
+
| 4:42:42 PM | 5 | analyze_diff_section | ✅ Success | 2ms |
|
|
57
|
+
| 4:42:43 PM | 6 | get_file_content | ✅ Success | 1ms |
|
|
58
|
+
| 4:42:45 PM | 7 | search_codebase | ✅ Success | 21ms |
|
|
59
|
+
|
|
60
|
+
## Conversation History
|
|
61
|
+
|
|
62
|
+
<details>
|
|
63
|
+
<summary>Click to expand full agentic interaction</summary>
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
[
|
|
67
|
+
{
|
|
68
|
+
"role": "system",
|
|
69
|
+
"content": "You are a professional software engineer writing release notes for your team and users.\n\n## Available Tools\n\nYou have access to tools to investigate the release:\n- `get_tag_history` - Understand release patterns\n- `get_release_stats` - Quantify scope of changes\n- `compare_previous_release` - See how this compares to previous releases\n- `group_files_by_concern` - Identify themes in changes\n- `analyze_commit_patterns` - Detect patterns in commits\n- `get_file_content` - Read file contents or diffs\n- `analyze_diff_section` - Expand unclear changes\n- `get_file_history` - Understand how code evolved\n- `get_file_dependencies` - Assess impact and reach\n- `search_codebase` - Find usage patterns\n- `get_related_tests` - Understand behavior changes\n- `get_breaking_changes` - Identify breaking changes (always use this)\n\nUse these tools to investigate the changes rather than asking for information upfront.\n\n## Your Task\n\nWrite release notes that clearly explain what's in this release and why it matters. Your notes should help users and developers understand what changed without needing to read every commit.\n\nFocus on:\n- What problems does this release solve?\n- What new capabilities does it add?\n- What's the impact on users and developers?\n- Are there breaking changes or important considerations?\n\nUse the available tools to investigate the changes. The more you understand, the better your notes will be.\n\n**Important**: If additional context is provided (from context files or other sources), use your judgment:\n- If the context is relevant to this specific package/release, incorporate it appropriately\n- If the context describes changes in other packages or unrelated work, ignore it\n- Don't fabricate connections between this package and unrelated context\n- Be honest about what changed - only mention what actually happened in this release\n- Context is supplemental information, not a requirement to include\n\n## Investigation Approach\n\nUse tools based on what you need to know:\n\n**Context:**\n- get_tag_history - understand release patterns\n- get_release_stats - quantify scope\n- compare_previous_release - see how this compares\n\n**Understanding:**\n- group_files_by_concern - identify themes\n- analyze_commit_patterns - detect patterns\n- get_file_content - see full context\n- analyze_diff_section - expand unclear changes\n- get_file_history - understand evolution\n\n**Impact:**\n- get_file_dependencies - assess reach\n- search_codebase - find usage patterns\n- get_related_tests - understand behavior changes\n- get_breaking_changes - identify breaking changes (always use)\n\n## Writing Style\n\nWrite naturally and directly:\n- Use plain language that users can understand\n- Be specific about what changed and why\n- Avoid marketing speak and buzzwords\n- No emojis or excessive punctuation\n- No phrases like \"we're excited to announce\"\n- No meta-commentary about the release itself\n- Focus on facts and implications, not enthusiasm\n\nStructure your notes logically:\n- Start with the most important changes\n- Group related changes together\n- Explain breaking changes clearly\n- Include practical examples when helpful\n\n## Output Format\n\nWhen ready, output your release notes in this exact format:\n\nRELEASE_TITLE:\n[A clear, factual title describing the main changes]\n\nRELEASE_BODY:\n[Detailed release notes in Markdown format]\n\nDo not include any JSON, code blocks, or wrapper syntax. Output plain text and markdown only.\nNo conversational remarks or follow-up offers."
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"role": "user",
|
|
73
|
+
"content": "I need comprehensive release notes for changes from main to HEAD.\n\n**CRITICAL VERSION INSTRUCTION: This is a release for version 1.0.4. You MUST use EXACTLY \"1.0.4\" in your release title. DO NOT use any development/prerelease version numbers you may see in the diff (like 1.0.4-dev.0 or similar). The release version is 1.0.4.**\n\n## Your Analysis Task\n\nUse your tools to investigate the changes between main and HEAD:\n1. Use `get_release_stats` to understand the scope of changes\n2. Use `get_tag_history` or `compare_previous_release` to see release patterns\n3. Use `analyze_commit_patterns` to detect themes\n4. Use `group_files_by_concern` to identify logical groupings\n5. Use `get_breaking_changes` to identify breaking changes (always check this)\n6. Use `get_file_content` or `analyze_diff_section` to understand specific changes\n7. Use `get_file_dependencies` and `search_codebase` to assess impact\n\nWrite clear release notes that answer:\n- What's the main story of this release?\n- What problems does it solve?\n- What's the impact on users and developers?\n- Are there breaking changes?\n\nIf context information is provided, use it only if relevant to this specific package.\nDon't force connections that don't exist - if context describes changes in other packages\nor unrelated features, simply ignore it and focus on what actually changed in this release.\n\nStart by gathering statistics and understanding the scope, then investigate specific changes as needed."
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"role": "assistant",
|
|
77
|
+
"content": null,
|
|
78
|
+
"tool_calls": [
|
|
79
|
+
{
|
|
80
|
+
"id": "call_NIL7TU8pVsjsPz9xMpkSXkmg",
|
|
81
|
+
"type": "function",
|
|
82
|
+
"function": {
|
|
83
|
+
"name": "get_release_stats",
|
|
84
|
+
"arguments": "{\"fromRef\": \"main\", \"toRef\": \"HEAD\"}"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "call_9G1Wsl3gi8JSZh1bsj2wsIJL",
|
|
89
|
+
"type": "function",
|
|
90
|
+
"function": {
|
|
91
|
+
"name": "get_tag_history",
|
|
92
|
+
"arguments": "{\"limit\": 15, \"pattern\": \"v*\"}"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "call_psQMLdTnF1HGsPQQViHeRTbP",
|
|
97
|
+
"type": "function",
|
|
98
|
+
"function": {
|
|
99
|
+
"name": "analyze_commit_patterns",
|
|
100
|
+
"arguments": "{\"fromRef\": \"main\", \"toRef\": \"HEAD\"}"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"id": "call_D95ZZPaz7MjNxJPeeIclhdoR",
|
|
105
|
+
"type": "function",
|
|
106
|
+
"function": {
|
|
107
|
+
"name": "get_breaking_changes",
|
|
108
|
+
"arguments": "{\"fromRef\": \"main\", \"toRef\": \"HEAD\"}"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"role": "tool",
|
|
115
|
+
"tool_call_id": "call_NIL7TU8pVsjsPz9xMpkSXkmg",
|
|
116
|
+
"content": "Total commits: 6\n\nContributors:\n 6\tTim O'Brien\n\n\nFile changes: 3 files changed, 5 insertions(+), 5 deletions(-)\n\nTop 10 most changed files:\n src/logger.ts | 2 +-\n SECURITY.md | 4 ++--\n package.json | 4 ++--\n 3 files changed, 5 insertions(+), 5 deletions(-)\n",
|
|
117
|
+
"name": "get_release_stats"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"role": "tool",
|
|
121
|
+
"tool_call_id": "call_9G1Wsl3gi8JSZh1bsj2wsIJL",
|
|
122
|
+
"content": "Recent release tags:\nv1.0.2: 2026-01-28 09:19:17 -0800 - fix: add npm tag detection for prerelease versions in publish workflow (#12)\nv: 2026-01-28 09:05:02 -0800 - fix: add ajv override to resolve dependency conflict (#10)\nv1.0.0: 2026-01-15 07:55:22 -0800 - chore(release): bump version to 1.0.0 (#9)\nv0.0.5: 2026-01-13 00:18:46 -0800 - chore(release): bump version to 0.0.5 (#8)\nv0.0.4: 2026-01-12 21:56:42 -0800 - chore(release): bump version to 0.0.4 (#7)\nv0.0.4-dev.0: tag v0.0.4-dev.0\nTagger: Tim O'Brien <tobrien@discursive.com>\n\n0.0.4-dev.0\n2026-01-10 13:10:07 -0800 - 0.0.4-dev.0\nv0.0.3: 2026-01-10 13:09:13 -0800 - Adding appropriate repository.url (#6)\nv0.0.3-dev.0: tag v0.0.3-dev.0\nTagger: Tim O'Brien <tobrien@discursive.com>\n\n0.0.3-dev.0\n2026-01-10 12:23:27 -0800 - 0.0.3-dev.0\nv0.0.2: 2026-01-10 12:10:54 -0800 - chore(release): bump version to 0.0.2 (#4)\nv0.0.2-dev.0: tag v0.0.2-dev.0\nTagger: Tim O'Brien <tobrien@discursive.com>\n\n0.0.2-dev.0\n2026-01-10 11:19:56 -0800 - 0.0.2-dev.0",
|
|
123
|
+
"name": "get_tag_history"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"role": "tool",
|
|
127
|
+
"tool_call_id": "call_psQMLdTnF1HGsPQQViHeRTbP",
|
|
128
|
+
"content": "Commit types:\n chore: 4\n refactor: 1\n\nTop keywords in commits:\n chore: 4\n package: 3\n version: 1\n update: 1\n metadata: 1\n dependencies: 1\n refactor: 1\n logger: 1\n default: 1\n silent: 1\n output: 1\n document: 1\n logging: 1\n enablement: 1\n merge: 1",
|
|
129
|
+
"name": "analyze_commit_patterns"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"role": "tool",
|
|
133
|
+
"tool_call_id": "call_D95ZZPaz7MjNxJPeeIclhdoR",
|
|
134
|
+
"content": "No obvious breaking changes detected. Manual review recommended for API changes.",
|
|
135
|
+
"name": "get_breaking_changes"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"role": "assistant",
|
|
139
|
+
"content": null,
|
|
140
|
+
"tool_calls": [
|
|
141
|
+
{
|
|
142
|
+
"id": "call_QY8aFnSZV5WUD5gyQzzJEQwq",
|
|
143
|
+
"type": "function",
|
|
144
|
+
"function": {
|
|
145
|
+
"name": "group_files_by_concern",
|
|
146
|
+
"arguments": "{\"filePaths\": [\"src/logger.ts\", \"SECURITY.md\", \"package.json\"]}"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"id": "call_R9ICI9jg7no8AoKPxMXAfYvd",
|
|
151
|
+
"type": "function",
|
|
152
|
+
"function": {
|
|
153
|
+
"name": "get_file_content",
|
|
154
|
+
"arguments": "{\"filePath\": \"src/logger.ts\", \"includeLineNumbers\": true}"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"id": "call_tCzWzG0Dmj5aOrKlm5kWJuxQ",
|
|
159
|
+
"type": "function",
|
|
160
|
+
"function": {
|
|
161
|
+
"name": "get_file_content",
|
|
162
|
+
"arguments": "{\"filePath\": \"package.json\", \"includeLineNumbers\": true}"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"id": "call_SuEXFAKPGgpRNOvO6ozUX8VG",
|
|
167
|
+
"type": "function",
|
|
168
|
+
"function": {
|
|
169
|
+
"name": "get_file_content",
|
|
170
|
+
"arguments": "{\"filePath\": \"SECURITY.md\", \"includeLineNumbers\": true}"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"role": "tool",
|
|
177
|
+
"tool_call_id": "call_QY8aFnSZV5WUD5gyQzzJEQwq",
|
|
178
|
+
"content": "source:src (1 files):\n - src/logger.ts\n\ndocumentation (1 files):\n - SECURITY.md\n\ndependencies (1 files):\n - package.json\n\nSuggestion: These 3 groups represent different concerns in the release.",
|
|
179
|
+
"name": "group_files_by_concern"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"role": "tool",
|
|
183
|
+
"tool_call_id": "call_R9ICI9jg7no8AoKPxMXAfYvd",
|
|
184
|
+
"content": "1: /**\n2: * Agentic Package - Logger\n3: *\n4: * Shared logging infrastructure backed by @fjell/logging for\n5: * comprehensive sensitive data masking and structured logging.\n6: */\n7: \n8: import Logging from '@fjell/logging';\n9: \n10: export const LIBRARY_NAME = 'agentic';\n11: \n12: // Get the library-level logger from Fjell\n13: const LibLogger = Logging.getLogger('@riotprompt/agentic');\n14: \n15: /**\n16: * Create a silent logger with the given name\n17: */\n18: function createSilentLogger(name: string): Logger {\n19: return {\n20: name,\n21: debug: () => {},\n22: info: () => {},\n23: warn: () => {},\n24: error: () => {},\n25: verbose: () => {},\n26: silly: () => {},\n27: get: (...components: string[]) => createSilentLogger(`${name}:${components.join(':')}`),\n28: };\n29: }\n30: \n31: /**\n32: * Silent logger that discards all output\n33: * Use this as default to prevent accidental information disclosure\n34: */\n35: export const SILENT_LOGGER: Logger = createSilentLogger('silent');\n36: \n37: /**\n38: * Check if logging is explicitly enabled via environment variable\n39: */\n40: const isLoggingEnabled = (): boolean => {\n41: return process.env.AGENTIC_LOGGING === 'true' ||\n42: process.env.DEBUG?.includes('agentic') ||\n43: process.env.NODE_ENV === 'development';\n44: };\n45: \n46: export interface Logger {\n47: name: string;\n48: debug: (message: string, ...args: any[]) => void;\n49: info: (message: string, ...args: any[]) => void;\n50: warn: (message: string, ...args: any[]) => void;\n51: error: (message: string, ...args: any[]) => void;\n52: verbose: (message: string, ...args: any[]) => void;\n53: silly: (message: string, ...args: any[]) => void;\n54: /** Get a child logger for a component */\n55: get?: (...components: string[]) => Logger;\n56: }\n57: \n58: /**\n59: * Create a Logger from a Fjell logger instance\n60: */\n61: function createLoggerFromFjell(fjellLogger: ReturnType<typeof LibLogger.get>, name: string): Logger {\n62: return {\n63: name,\n64: debug: (message: string, ...args: any[]) => fjellLogger.debug(message, ...args),\n65: info: (message: string, ...args: any[]) => fjellLogger.info(message, ...args),\n66: warn: (message: string, ...args: any[]) => fjellLogger.warning(message, ...args),\n67: error: (message: string, ...args: any[]) => fjellLogger.error(message, ...args),\n68: verbose: (message: string, ...args: any[]) => fjellLogger.debug(message, ...args),\n69: silly: (message: string, ...args: any[]) => fjellLogger.debug(message, ...args),\n70: get: (...components: string[]) => {\n71: const childLogger = fjellLogger.get(...components);\n72: return createLoggerFromFjell(childLogger, `${name}:${components.join(':')}`);\n73: },\n74: };\n75: }\n76: \n77: /**\n78: * Fjell-backed logger with sensitive data masking\n79: * \n80: * Features:\n81: * - Automatic sensitive data masking (API keys, passwords, etc.)\n82: * - Circular reference protection\n83: * - Hierarchical component logging\n84: */\n85: const FJELL_LOGGER: Logger = {\n86: name: 'fjell',\n87: debug: (message: string, ...args: any[]) => LibLogger.debug(message, ...args),\n88: info: (message: string, ...args: any[]) => LibLogger.info(message, ...args),\n89: warn: (message: string, ...args: any[]) => LibLogger.warning(message, ...args),\n90: error: (message: string, ...args: any[]) => LibLogger.error(message, ...args),\n91: verbose: (message: string, ...args: any[]) => LibLogger.debug(message, ...args),\n92: silly: (message: string, ...args: any[]) => LibLogger.debug(message, ...args),\n93: get: (...components: string[]) => {\n94: const childLogger = LibLogger.get(...components);\n95: return createLoggerFromFjell(childLogger, components.join(':'));\n96: },\n97: };\n98: \n99: /**\n100: * Default logger - silent by default to prevent information disclosure\n101: * \n102: * Enable logging by setting one of:\n103: * - AGENTIC_LOGGING=true\n104: * - DEBUG=*agentic*\n105: * - NODE_ENV=development\n106: */\n107: export const DEFAULT_LOGGER: Logger = isLoggingEnabled() ? FJELL_LOGGER : SILENT_LOGGER;\n108: \n109: export function wrapLogger(toWrap: Logger, name?: string): Logger {\n110: const requiredMethods: (keyof Logger)[] = [\n111: 'debug',\n112: 'info',\n113: 'warn',\n114: 'error',\n115: 'verbose',\n116: 'silly',\n117: ];\n118: const missingMethods = requiredMethods.filter(\n119: (method) => typeof toWrap[method] !== 'function'\n120: );\n121: \n122: if (missingMethods.length > 0) {\n123: throw new Error(\n124: `Logger is missing required methods: ${missingMethods.join(', ')}`\n125: );\n126: }\n127: \n128: const log = (level: keyof Logger, message: string, ...args: any[]) => {\n129: message = `[${LIBRARY_NAME}] ${name ? `[${name}]` : ''}: ${message}`;\n130: \n131: if (level === 'debug') toWrap.debug(message, ...args);\n132: else if (level === 'info') toWrap.info(message, ...args);\n133: else if (level === 'warn') toWrap.warn(message, ...args);\n134: else if (level === 'error') toWrap.error(message, ...args);\n135: else if (level === 'verbose') toWrap.verbose(message, ...args);\n136: else if (level === 'silly') toWrap.silly(message, ...args);\n137: };\n138: \n139: return {\n140: name: name || 'wrapped',\n141: debug: (message: string, ...args: any[]) => log('debug', message, ...args),\n142: info: (message: string, ...args: any[]) => log('info', message, ...args),\n143: warn: (message: string, ...args: any[]) => log('warn', message, ...args),\n144: error: (message: string, ...args: any[]) => log('error', message, ...args),\n145: verbose: (message: string, ...args: any[]) =>\n146: log('verbose', message, ...args),\n147: silly: (message: string, ...args: any[]) => log('silly', message, ...args),\n148: get: (...components: string[]) => wrapLogger(toWrap, name ? `${name}:${components.join(':')}` : components.join(':')),\n149: };\n150: }\n151: ",
|
|
185
|
+
"name": "get_file_content"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"role": "tool",
|
|
189
|
+
"tool_call_id": "call_tCzWzG0Dmj5aOrKlm5kWJuxQ",
|
|
190
|
+
"content": "1: {\n2: \"name\": \"@riotprompt/agentic\",\n3: \"version\": \"1.0.4\",\n4: \"_versionReset\": \"2026-01-15\",\n5: \"description\": \"Shared agentic framework for multi-turn AI conversations and tool orchestration\",\n6: \"type\": \"module\",\n7: \"main\": \"./dist/index.js\",\n8: \"types\": \"./dist/index.d.ts\",\n9: \"exports\": {\n10: \".\": {\n11: \"types\": \"./dist/index.d.ts\",\n12: \"import\": \"./dist/index.js\"\n13: }\n14: },\n15: \"engines\": {\n16: \"node\": \">=24.0.0\"\n17: },\n18: \"scripts\": {\n19: \"clean\": \"rm -rf dist\",\n20: \"build\": \"vite build\",\n21: \"test\": \"vitest run --coverage\",\n22: \"test:coverage\": \"vitest run --coverage\",\n23: \"lint\": \"eslint src\",\n24: \"precommit\": \"npm run build && npm run lint && npm run test\",\n25: \"prepublishOnly\": \"npm run clean && npm run build\"\n26: },\n27: \"keywords\": [\n28: \"agentic\",\n29: \"ai\",\n30: \"llm\",\n31: \"conversation\",\n32: \"tools\",\n33: \"multi-turn\",\n34: \"orchestration\"\n35: ],\n36: \"author\": \"Tim O'Brien <tobrien@discursive.com>\",\n37: \"license\": \"Apache-2.0\",\n38: \"repository\": {\n39: \"type\": \"git\",\n40: \"url\": \"https://github.com/kjerneverk/agentic\"\n41: },\n42: \"dependencies\": {\n43: \"@fjell/logging\": \"^4.4.68\",\n44: \"zod\": \"^4.3.6\"\n45: },\n46: \"devDependencies\": {\n47: \"@types/node\": \"^25.0.6\",\n48: \"@typescript-eslint/eslint-plugin\": \"^8.33.1\",\n49: \"@typescript-eslint/parser\": \"^8.33.1\",\n50: \"@vitest/coverage-v8\": \"^4.0.16\",\n51: \"ajv\": \"^8.17.1\",\n52: \"eslint\": \"^9.28.0\",\n53: \"globals\": \"^17.0.0\",\n54: \"typescript\": \"^5.8.3\",\n55: \"vite\": \"^7.0.4\",\n56: \"vite-plugin-dts\": \"^4.5.4\",\n57: \"vitest\": \"^4.0.16\"\n58: }\n59: }\n60: ",
|
|
191
|
+
"name": "get_file_content"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"role": "tool",
|
|
195
|
+
"tool_call_id": "call_SuEXFAKPGgpRNOvO6ozUX8VG",
|
|
196
|
+
"content": "1: # Security Policy\n2: \n3: ## Supported Versions\n4: \n5: | Version | Supported |\n6: | ------- | ------------------ |\n7: | 0.x.x | :white_check_mark: |\n8: \n9: ## Reporting a Vulnerability\n10: \n11: If you discover a security vulnerability, please report it responsibly.\n12: \n13: **Do not open a public GitHub issue for security vulnerabilities.**\n14: \n15: ## Security Features\n16: \n17: The agentic package includes security features for tool execution:\n18: \n19: ### Tool Validation (ToolGuard)\n20: \n21: ```typescript\n22: import { ToolGuard } from '@riotprompt/agentic';\n23: import { z } from 'zod';\n24: \n25: const guard = new ToolGuard({\n26: enabled: true,\n27: validateParams: true,\n28: detectPrototypePollution: true,\n29: });\n30: \n31: // Register tool schemas\n32: guard.registerSchema('read_file', z.object({\n33: path: z.string().max(1000),\n34: encoding: z.enum(['utf8', 'base64']).optional(),\n35: }));\n36: \n37: // Validate before execution\n38: const result = guard.validate('read_file', params);\n39: if (!result.valid) {\n40: // Handle validation failure\n41: }\n42: ```\n43: \n44: ### Tool Sandboxing (ToolSandbox)\n45: \n46: ```typescript\n47: import { ToolSandbox } from '@riotprompt/agentic';\n48: \n49: const sandbox = new ToolSandbox({\n50: enabled: true,\n51: maxExecutionTime: 30000,\n52: maxConcurrent: 5,\n53: maxOutputSize: 1024 * 1024, // 1MB\n54: });\n55: \n56: // Execute with sandboxing\n57: const result = await sandbox.execute(\n58: 'my_tool',\n59: async (signal) => {\n60: // Tool implementation\n61: // Check signal.aborted for cancellation\n62: }\n63: );\n64: ```\n65: \n66: ### Security Features\n67: \n68: - **Parameter Validation**: Zod schema validation for all tool parameters\n69: - **Prototype Pollution Prevention**: Blocks `__proto__`, `constructor`, `prototype`\n70: - **Execution Timeouts**: Configurable timeouts for tool execution\n71: - **Concurrency Limits**: Limit concurrent tool executions\n72: - **Output Size Limits**: Prevent memory exhaustion from large outputs\n73: - **Allow/Deny Lists**: Control which tools can be executed\n74: - **Silent Logging**: Library logging disabled by default\n75: \n76: ## Environment Variables\n77: \n78: ```bash\n79: # Enable agentic logging\n80: AGENTIC_LOGGING=true\n81: \n82: # Or use DEBUG pattern\n83: DEBUG=*agentic*\n84: ```\n85: \n86: ## Security Checklist\n87: \n88: - [ ] Define Zod schemas for all tool parameters\n89: - [ ] Enable prototype pollution detection\n90: - [ ] Set appropriate execution timeouts\n91: - [ ] Configure concurrency limits\n92: - [ ] Use allow/deny lists for tools in production\n93: - [ ] Monitor tool execution metrics\n94: \n95: ",
|
|
197
|
+
"name": "get_file_content"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"role": "assistant",
|
|
201
|
+
"content": null,
|
|
202
|
+
"tool_calls": [
|
|
203
|
+
{
|
|
204
|
+
"id": "call_0yuBD2p5efLCr19IjqL67Oeg",
|
|
205
|
+
"type": "function",
|
|
206
|
+
"function": {
|
|
207
|
+
"name": "get_file_dependencies",
|
|
208
|
+
"arguments": "{\"filePaths\": [\"src/logger.ts\"]}"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"id": "call_A4HnHyuzT6vUJQtZ4qMGFlpR",
|
|
213
|
+
"type": "function",
|
|
214
|
+
"function": {
|
|
215
|
+
"name": "search_codebase",
|
|
216
|
+
"arguments": "{\"query\": \"DEFAULT_LOGGER\", \"fileTypes\": [\"ts\", \"js\"]}"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"id": "call_fDFQgciWGCAxX5OB6ydYvNy0",
|
|
221
|
+
"type": "function",
|
|
222
|
+
"function": {
|
|
223
|
+
"name": "search_codebase",
|
|
224
|
+
"arguments": "{\"query\": \"SILENT_LOGGER\", \"fileTypes\": [\"ts\", \"js\"]}"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"id": "call_iTXsKAYtznLGkh6x2U2kpZgy",
|
|
229
|
+
"type": "function",
|
|
230
|
+
"function": {
|
|
231
|
+
"name": "search_codebase",
|
|
232
|
+
"arguments": "{\"query\": \"wrapLogger(\", \"fileTypes\": [\"ts\", \"js\"]}"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"role": "tool",
|
|
239
|
+
"tool_call_id": "call_0yuBD2p5efLCr19IjqL67Oeg",
|
|
240
|
+
"content": "Files importing src/logger.ts:\nsrc/context-manager.ts\nsrc/index.ts\nsrc/logger.ts\nsrc/tool-guard.ts\nsrc/tool-sandbox.ts\nsrc/tools.ts\n",
|
|
241
|
+
"name": "get_file_dependencies"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"role": "tool",
|
|
245
|
+
"tool_call_id": "call_A4HnHyuzT6vUJQtZ4qMGFlpR",
|
|
246
|
+
"content": "src/context-manager.ts-6-\nsrc/context-manager.ts-7-import crypto from 'crypto';\nsrc/context-manager.ts:8:import { DEFAULT_LOGGER, wrapLogger, type Logger } from './logger';\nsrc/context-manager.ts-9-import type { DynamicContentItem, TrackedContextItem } from './types';\nsrc/context-manager.ts-10-\n--\nsrc/context-manager.ts-32- this.items = new Map();\nsrc/context-manager.ts-33- this.hashes = new Set();\nsrc/context-manager.ts:34: this.logger = wrapLogger(logger || DEFAULT_LOGGER, 'ContextManager');\nsrc/context-manager.ts-35- }\nsrc/context-manager.ts-36-\n--\nsrc/index.ts-36-// Logger\nsrc/index.ts-37-export type { Logger } from './logger';\nsrc/index.ts:38:export { DEFAULT_LOGGER, wrapLogger, LIBRARY_NAME } from './logger';\nsrc/index.ts-39-\nsrc/index.ts-40-// Tool Registry\n--\nsrc/logger.ts-105- * - NODE_ENV=development\nsrc/logger.ts-106- */\nsrc/logger.ts:107:export const DEFAULT_LOGGER: Logger = isLoggingEnabled() ? FJELL_LOGGER : SILENT_LOGGER;\nsrc/logger.ts-108-\nsrc/logger.ts-109-export function wrapLogger(toWrap: Logger, name?: string): Logger {\n--\nsrc/tool-guard.ts-6-\nsrc/tool-guard.ts-7-import { ZodSchema, ZodError } from 'zod';\nsrc/tool-guard.ts:8:import { DEFAULT_LOGGER, wrapLogger, type Logger } from './logger';\nsrc/tool-guard.ts-9-\nsrc/tool-guard.ts-10-/**\n--\nsrc/tool-guard.ts-83- ) {\nsrc/tool-guard.ts-84- this.config = { ...DEFAULT_CONFIG, ...config };\nsrc/tool-guard.ts:85: this.logger = wrapLogger(logger || DEFAULT_LOGGER, 'ToolGuard');\nsrc/tool-guard.ts-86- this.events = events;\nsrc/tool-guard.ts-87- }\n--\nsrc/tool-sandbox.ts-8-import { ToolContext, Tool } from './tools';\nsrc/tool-sandbox.ts-9-import { ToolSecurityConfig, ToolGuard } from './tool-guard';\nsrc/tool-sandbox.ts:10:import { DEFAULT_LOGGER, wrapLogger, type Logger } from './logger';\nsrc/tool-sandbox.ts-11-\nsrc/tool-sandbox.ts-12-/**\n--\nsrc/tool-sandbox.ts-97- ...config,\nsrc/tool-sandbox.ts-98- };\nsrc/tool-sandbox.ts:99: this.logger = wrapLogger(logger || DEFAULT_LOGGER, 'ToolSandbox');\nsrc/tool-sandbox.ts-100- this.events = events;\nsrc/tool-sandbox.ts-101- }\n--\nsrc/tools.ts-6-\nsrc/tools.ts-7-import { z, ZodSchema } from 'zod';\nsrc/tools.ts:8:import { DEFAULT_LOGGER, wrapLogger, type Logger } from './logger';\nsrc/tools.ts-9-import { ToolGuard } from './tool-guard';\nsrc/tools.ts-10-import { ToolSandbox } from './tool-sandbox';\n--\nsrc/tools.ts-181- this.tools = new Map();\nsrc/tools.ts-182- this.context = context;\nsrc/tools.ts:183: this.logger = wrapLogger(logger || DEFAULT_LOGGER, 'ToolRegistry');\nsrc/tools.ts-184- this.usageStats = new Map();\nsrc/tools.ts-185-\n",
|
|
247
|
+
"name": "search_codebase"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"role": "tool",
|
|
251
|
+
"tool_call_id": "call_fDFQgciWGCAxX5OB6ydYvNy0",
|
|
252
|
+
"content": "src/logger.ts-33- * Use this as default to prevent accidental information disclosure\nsrc/logger.ts-34- */\nsrc/logger.ts:35:export const SILENT_LOGGER: Logger = createSilentLogger('silent');\nsrc/logger.ts-36-\nsrc/logger.ts-37-/**\n--\nsrc/logger.ts-105- * - NODE_ENV=development\nsrc/logger.ts-106- */\nsrc/logger.ts:107:export const DEFAULT_LOGGER: Logger = isLoggingEnabled() ? FJELL_LOGGER : SILENT_LOGGER;\nsrc/logger.ts-108-\nsrc/logger.ts-109-export function wrapLogger(toWrap: Logger, name?: string): Logger {\n",
|
|
253
|
+
"name": "search_codebase"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"role": "tool",
|
|
257
|
+
"tool_call_id": "call_iTXsKAYtznLGkh6x2U2kpZgy",
|
|
258
|
+
"content": "src/context-manager.ts-32- this.items = new Map();\nsrc/context-manager.ts-33- this.hashes = new Set();\nsrc/context-manager.ts:34: this.logger = wrapLogger(logger || DEFAULT_LOGGER, 'ContextManager');\nsrc/context-manager.ts-35- }\nsrc/context-manager.ts-36-\n--\nsrc/logger.ts-107-export const DEFAULT_LOGGER: Logger = isLoggingEnabled() ? FJELL_LOGGER : SILENT_LOGGER;\nsrc/logger.ts-108-\nsrc/logger.ts:109:export function wrapLogger(toWrap: Logger, name?: string): Logger {\nsrc/logger.ts-110- const requiredMethods: (keyof Logger)[] = [\nsrc/logger.ts-111- 'debug',\n--\nsrc/logger.ts-146- log('verbose', message, ...args),\nsrc/logger.ts-147- silly: (message: string, ...args: any[]) => log('silly', message, ...args),\nsrc/logger.ts:148: get: (...components: string[]) => wrapLogger(toWrap, name ? `${name}:${components.join(':')}` : components.join(':')),\nsrc/logger.ts-149- };\nsrc/logger.ts-150-}\n--\nsrc/tool-guard.ts-83- ) {\nsrc/tool-guard.ts-84- this.config = { ...DEFAULT_CONFIG, ...config };\nsrc/tool-guard.ts:85: this.logger = wrapLogger(logger || DEFAULT_LOGGER, 'ToolGuard');\nsrc/tool-guard.ts-86- this.events = events;\nsrc/tool-guard.ts-87- }\n--\nsrc/tool-sandbox.ts-97- ...config,\nsrc/tool-sandbox.ts-98- };\nsrc/tool-sandbox.ts:99: this.logger = wrapLogger(logger || DEFAULT_LOGGER, 'ToolSandbox');\nsrc/tool-sandbox.ts-100- this.events = events;\nsrc/tool-sandbox.ts-101- }\n--\nsrc/tools.ts-181- this.tools = new Map();\nsrc/tools.ts-182- this.context = context;\nsrc/tools.ts:183: this.logger = wrapLogger(logger || DEFAULT_LOGGER, 'ToolRegistry');\nsrc/tools.ts-184- this.usageStats = new Map();\nsrc/tools.ts-185-\n",
|
|
259
|
+
"name": "search_codebase"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"role": "assistant",
|
|
263
|
+
"content": null,
|
|
264
|
+
"tool_calls": [
|
|
265
|
+
{
|
|
266
|
+
"id": "call_IwNlfqvrw4zIsqIBH92VUVtD",
|
|
267
|
+
"type": "function",
|
|
268
|
+
"function": {
|
|
269
|
+
"name": "get_file_history",
|
|
270
|
+
"arguments": "{\"filePaths\": [\"src/logger.ts\", \"package.json\", \"SECURITY.md\"], \"limit\": 10, \"format\": \"summary\"}"
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"id": "call_RKVn0SQizFlQcJJeBFCGXHYw",
|
|
275
|
+
"type": "function",
|
|
276
|
+
"function": {
|
|
277
|
+
"name": "compare_previous_release",
|
|
278
|
+
"arguments": "{\"previousTag\": \"v1.0.2\", \"currentRef\": \"HEAD\", \"statsOnly\": false}"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"role": "tool",
|
|
285
|
+
"tool_call_id": "call_IwNlfqvrw4zIsqIBH92VUVtD",
|
|
286
|
+
"content": "576e350 - chore(package): bump version to 1.0.4 (Tim O'Brien, 9 seconds ago)\n314ab9a - chore(package): update package metadata/dependencies (Tim O'Brien, 4 minutes ago)\nc65ed87 - refactor(logger): default to silent output and document logging enablement (Tim O'Brien, 4 minutes ago)\n2a297b8 - chore: bump to 1.0.4-dev.0 (Tim O'Brien, 2 days ago)\n2be3cbb - chore: bump to 1.0.3-dev.0 (Tim O'Brien, 2 days ago)\nedddcf9 - fix: add ajv@^8 as explicit devDependency to resolve vite-plugin-dts conflict (#11) (Tim O'Brien, 2 days ago)\n15269f3 - fix: add ajv override to resolve dependency conflict (#10) (Tim O'Brien, 2 days ago)\n3e10dc9 - chore(release): bump version to 1.0.0 (#9) (Tim O'Brien, 2 weeks ago)\n65fae30 - chore(release): bump version to 0.0.5 (#8) (Tim O'Brien, 3 weeks ago)\n48006d5 - chore(release): bump version to 0.0.4 (#7) (Tim O'Brien, 3 weeks ago)\n",
|
|
287
|
+
"name": "get_file_history"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"role": "tool",
|
|
291
|
+
"tool_call_id": "call_RKVn0SQizFlQcJJeBFCGXHYw",
|
|
292
|
+
"content": "Comparison between v1.0.2 and HEAD:\n\nCommits: 7\n\nFile changes:\n SECURITY.md | 4 ++--\n package.json | 4 ++--\n src/logger.ts | 2 +-\n 3 files changed, 5 insertions(+), 5 deletions(-)\n\n\nCommit summary:\n576e350 chore(package): bump version to 1.0.4\n314ab9a chore(package): update package metadata/dependencies\nc65ed87 refactor(logger): default to silent output and document logging enablement\n2a297b8 chore: bump to 1.0.4-dev.0\n1247dac Merge main into working for sync\neb0be7d chore: bump to 1.0.3-dev.0 (#13)\n2be3cbb chore: bump to 1.0.3-dev.0\n",
|
|
293
|
+
"name": "compare_previous_release"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"role": "assistant",
|
|
297
|
+
"content": null,
|
|
298
|
+
"tool_calls": [
|
|
299
|
+
{
|
|
300
|
+
"id": "call_O9bPuHEcjcP2dC7qh3qMz9AZ",
|
|
301
|
+
"type": "function",
|
|
302
|
+
"function": {
|
|
303
|
+
"name": "analyze_diff_section",
|
|
304
|
+
"arguments": "{\"filePath\":\"src/logger.ts\",\"startLine\":30,\"endLine\":115,\"contextLines\":20}"
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
]
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"role": "tool",
|
|
311
|
+
"tool_call_id": "call_O9bPuHEcjcP2dC7qh3qMz9AZ",
|
|
312
|
+
"content": "Lines 10-135 from src/logger.ts:\n\n10: export const LIBRARY_NAME = 'agentic';\n11: \n12: // Get the library-level logger from Fjell\n13: const LibLogger = Logging.getLogger('@riotprompt/agentic');\n14: \n15: /**\n16: * Create a silent logger with the given name\n17: */\n18: function createSilentLogger(name: string): Logger {\n19: return {\n20: name,\n21: debug: () => {},\n22: info: () => {},\n23: warn: () => {},\n24: error: () => {},\n25: verbose: () => {},\n26: silly: () => {},\n27: get: (...components: string[]) => createSilentLogger(`${name}:${components.join(':')}`),\n28: };\n29: }\n30: \n31: /**\n32: * Silent logger that discards all output\n33: * Use this as default to prevent accidental information disclosure\n34: */\n35: export const SILENT_LOGGER: Logger = createSilentLogger('silent');\n36: \n37: /**\n38: * Check if logging is explicitly enabled via environment variable\n39: */\n40: const isLoggingEnabled = (): boolean => {\n41: return process.env.AGENTIC_LOGGING === 'true' ||\n42: process.env.DEBUG?.includes('agentic') ||\n43: process.env.NODE_ENV === 'development';\n44: };\n45: \n46: export interface Logger {\n47: name: string;\n48: debug: (message: string, ...args: any[]) => void;\n49: info: (message: string, ...args: any[]) => void;\n50: warn: (message: string, ...args: any[]) => void;\n51: error: (message: string, ...args: any[]) => void;\n52: verbose: (message: string, ...args: any[]) => void;\n53: silly: (message: string, ...args: any[]) => void;\n54: /** Get a child logger for a component */\n55: get?: (...components: string[]) => Logger;\n56: }\n57: \n58: /**\n59: * Create a Logger from a Fjell logger instance\n60: */\n61: function createLoggerFromFjell(fjellLogger: ReturnType<typeof LibLogger.get>, name: string): Logger {\n62: return {\n63: name,\n64: debug: (message: string, ...args: any[]) => fjellLogger.debug(message, ...args),\n65: info: (message: string, ...args: any[]) => fjellLogger.info(message, ...args),\n66: warn: (message: string, ...args: any[]) => fjellLogger.warning(message, ...args),\n67: error: (message: string, ...args: any[]) => fjellLogger.error(message, ...args),\n68: verbose: (message: string, ...args: any[]) => fjellLogger.debug(message, ...args),\n69: silly: (message: string, ...args: any[]) => fjellLogger.debug(message, ...args),\n70: get: (...components: string[]) => {\n71: const childLogger = fjellLogger.get(...components);\n72: return createLoggerFromFjell(childLogger, `${name}:${components.join(':')}`);\n73: },\n74: };\n75: }\n76: \n77: /**\n78: * Fjell-backed logger with sensitive data masking\n79: * \n80: * Features:\n81: * - Automatic sensitive data masking (API keys, passwords, etc.)\n82: * - Circular reference protection\n83: * - Hierarchical component logging\n84: */\n85: const FJELL_LOGGER: Logger = {\n86: name: 'fjell',\n87: debug: (message: string, ...args: any[]) => LibLogger.debug(message, ...args),\n88: info: (message: string, ...args: any[]) => LibLogger.info(message, ...args),\n89: warn: (message: string, ...args: any[]) => LibLogger.warning(message, ...args),\n90: error: (message: string, ...args: any[]) => LibLogger.error(message, ...args),\n91: verbose: (message: string, ...args: any[]) => LibLogger.debug(message, ...args),\n92: silly: (message: string, ...args: any[]) => LibLogger.debug(message, ...args),\n93: get: (...components: string[]) => {\n94: const childLogger = LibLogger.get(...components);\n95: return createLoggerFromFjell(childLogger, components.join(':'));\n96: },\n97: };\n98: \n99: /**\n100: * Default logger - silent by default to prevent information disclosure\n101: * \n102: * Enable logging by setting one of:\n103: * - AGENTIC_LOGGING=true\n104: * - DEBUG=*agentic*\n105: * - NODE_ENV=development\n106: */\n107: export const DEFAULT_LOGGER: Logger = isLoggingEnabled() ? FJELL_LOGGER : SILENT_LOGGER;\n108: \n109: export function wrapLogger(toWrap: Logger, name?: string): Logger {\n110: const requiredMethods: (keyof Logger)[] = [\n111: 'debug',\n112: 'info',\n113: 'warn',\n114: 'error',\n115: 'verbose',\n116: 'silly',\n117: ];\n118: const missingMethods = requiredMethods.filter(\n119: (method) => typeof toWrap[method] !== 'function'\n120: );\n121: \n122: if (missingMethods.length > 0) {\n123: throw new Error(\n124: `Logger is missing required methods: ${missingMethods.join(', ')}`\n125: );\n126: }\n127: \n128: const log = (level: keyof Logger, message: string, ...args: any[]) => {\n129: message = `[${LIBRARY_NAME}] ${name ? `[${name}]` : ''}: ${message}`;\n130: \n131: if (level === 'debug') toWrap.debug(message, ...args);\n132: else if (level === 'info') toWrap.info(message, ...args);\n133: else if (level === 'warn') toWrap.warn(message, ...args);\n134: else if (level === 'error') toWrap.error(message, ...args);\n135: else if (level === 'verbose') toWrap.verbose(message, ...args);",
|
|
313
|
+
"name": "analyze_diff_section"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"role": "assistant",
|
|
317
|
+
"content": null,
|
|
318
|
+
"tool_calls": [
|
|
319
|
+
{
|
|
320
|
+
"id": "call_X3kNeZYwrU7P3aElsatLpO9R",
|
|
321
|
+
"type": "function",
|
|
322
|
+
"function": {
|
|
323
|
+
"name": "get_file_content",
|
|
324
|
+
"arguments": "{\"filePath\":\"src/logger.ts\",\"includeLineNumbers\":false}"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
]
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"role": "tool",
|
|
331
|
+
"tool_call_id": "call_X3kNeZYwrU7P3aElsatLpO9R",
|
|
332
|
+
"content": "/**\n * Agentic Package - Logger\n *\n * Shared logging infrastructure backed by @fjell/logging for\n * comprehensive sensitive data masking and structured logging.\n */\n\nimport Logging from '@fjell/logging';\n\nexport const LIBRARY_NAME = 'agentic';\n\n// Get the library-level logger from Fjell\nconst LibLogger = Logging.getLogger('@riotprompt/agentic');\n\n/**\n * Create a silent logger with the given name\n */\nfunction createSilentLogger(name: string): Logger {\n return {\n name,\n debug: () => {},\n info: () => {},\n warn: () => {},\n error: () => {},\n verbose: () => {},\n silly: () => {},\n get: (...components: string[]) => createSilentLogger(`${name}:${components.join(':')}`),\n };\n}\n\n/**\n * Silent logger that discards all output\n * Use this as default to prevent accidental information disclosure\n */\nexport const SILENT_LOGGER: Logger = createSilentLogger('silent');\n\n/**\n * Check if logging is explicitly enabled via environment variable\n */\nconst isLoggingEnabled = (): boolean => {\n return process.env.AGENTIC_LOGGING === 'true' ||\n process.env.DEBUG?.includes('agentic') ||\n process.env.NODE_ENV === 'development';\n};\n\nexport interface Logger {\n name: string;\n debug: (message: string, ...args: any[]) => void;\n info: (message: string, ...args: any[]) => void;\n warn: (message: string, ...args: any[]) => void;\n error: (message: string, ...args: any[]) => void;\n verbose: (message: string, ...args: any[]) => void;\n silly: (message: string, ...args: any[]) => void;\n /** Get a child logger for a component */\n get?: (...components: string[]) => Logger;\n}\n\n/**\n * Create a Logger from a Fjell logger instance\n */\nfunction createLoggerFromFjell(fjellLogger: ReturnType<typeof LibLogger.get>, name: string): Logger {\n return {\n name,\n debug: (message: string, ...args: any[]) => fjellLogger.debug(message, ...args),\n info: (message: string, ...args: any[]) => fjellLogger.info(message, ...args),\n warn: (message: string, ...args: any[]) => fjellLogger.warning(message, ...args),\n error: (message: string, ...args: any[]) => fjellLogger.error(message, ...args),\n verbose: (message: string, ...args: any[]) => fjellLogger.debug(message, ...args),\n silly: (message: string, ...args: any[]) => fjellLogger.debug(message, ...args),\n get: (...components: string[]) => {\n const childLogger = fjellLogger.get(...components);\n return createLoggerFromFjell(childLogger, `${name}:${components.join(':')}`);\n },\n };\n}\n\n/**\n * Fjell-backed logger with sensitive data masking\n * \n * Features:\n * - Automatic sensitive data masking (API keys, passwords, etc.)\n * - Circular reference protection\n * - Hierarchical component logging\n */\nconst FJELL_LOGGER: Logger = {\n name: 'fjell',\n debug: (message: string, ...args: any[]) => LibLogger.debug(message, ...args),\n info: (message: string, ...args: any[]) => LibLogger.info(message, ...args),\n warn: (message: string, ...args: any[]) => LibLogger.warning(message, ...args),\n error: (message: string, ...args: any[]) => LibLogger.error(message, ...args),\n verbose: (message: string, ...args: any[]) => LibLogger.debug(message, ...args),\n silly: (message: string, ...args: any[]) => LibLogger.debug(message, ...args),\n get: (...components: string[]) => {\n const childLogger = LibLogger.get(...components);\n return createLoggerFromFjell(childLogger, components.join(':'));\n },\n};\n\n/**\n * Default logger - silent by default to prevent information disclosure\n * \n * Enable logging by setting one of:\n * - AGENTIC_LOGGING=true\n * - DEBUG=*agentic*\n * - NODE_ENV=development\n */\nexport const DEFAULT_LOGGER: Logger = isLoggingEnabled() ? FJELL_LOGGER : SILENT_LOGGER;\n\nexport function wrapLogger(toWrap: Logger, name?: string): Logger {\n const requiredMethods: (keyof Logger)[] = [\n 'debug',\n 'info',\n 'warn',\n 'error',\n 'verbose',\n 'silly',\n ];\n const missingMethods = requiredMethods.filter(\n (method) => typeof toWrap[method] !== 'function'\n );\n\n if (missingMethods.length > 0) {\n throw new Error(\n `Logger is missing required methods: ${missingMethods.join(', ')}`\n );\n }\n\n const log = (level: keyof Logger, message: string, ...args: any[]) => {\n message = `[${LIBRARY_NAME}] ${name ? `[${name}]` : ''}: ${message}`;\n\n if (level === 'debug') toWrap.debug(message, ...args);\n else if (level === 'info') toWrap.info(message, ...args);\n else if (level === 'warn') toWrap.warn(message, ...args);\n else if (level === 'error') toWrap.error(message, ...args);\n else if (level === 'verbose') toWrap.verbose(message, ...args);\n else if (level === 'silly') toWrap.silly(message, ...args);\n };\n\n return {\n name: name || 'wrapped',\n debug: (message: string, ...args: any[]) => log('debug', message, ...args),\n info: (message: string, ...args: any[]) => log('info', message, ...args),\n warn: (message: string, ...args: any[]) => log('warn', message, ...args),\n error: (message: string, ...args: any[]) => log('error', message, ...args),\n verbose: (message: string, ...args: any[]) =>\n log('verbose', message, ...args),\n silly: (message: string, ...args: any[]) => log('silly', message, ...args),\n get: (...components: string[]) => wrapLogger(toWrap, name ? `${name}:${components.join(':')}` : components.join(':')),\n };\n}\n",
|
|
333
|
+
"name": "get_file_content"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"role": "assistant",
|
|
337
|
+
"content": null,
|
|
338
|
+
"tool_calls": [
|
|
339
|
+
{
|
|
340
|
+
"id": "call_70cjjdrTSyHEvGDzn3YTciB0",
|
|
341
|
+
"type": "function",
|
|
342
|
+
"function": {
|
|
343
|
+
"name": "search_codebase",
|
|
344
|
+
"arguments": "{\"query\":\"AGENTIC_LOGGING\",\"fileTypes\":[\"ts\",\"md\"]}"
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
]
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"role": "tool",
|
|
351
|
+
"tool_call_id": "call_70cjjdrTSyHEvGDzn3YTciB0",
|
|
352
|
+
"content": "SECURITY.md-78-```bash\nSECURITY.md-79-# Enable agentic logging\nSECURITY.md:80:AGENTIC_LOGGING=true\nSECURITY.md-81-\nSECURITY.md-82-# Or use DEBUG pattern\n--\nsrc/logger.ts-39- */\nsrc/logger.ts-40-const isLoggingEnabled = (): boolean => {\nsrc/logger.ts:41: return process.env.AGENTIC_LOGGING === 'true' ||\nsrc/logger.ts-42- process.env.DEBUG?.includes('agentic') ||\nsrc/logger.ts-43- process.env.NODE_ENV === 'development';\n--\nsrc/logger.ts-101- * \nsrc/logger.ts-102- * Enable logging by setting one of:\nsrc/logger.ts:103: * - AGENTIC_LOGGING=true\nsrc/logger.ts-104- * - DEBUG=*agentic*\nsrc/logger.ts-105- * - NODE_ENV=development\n",
|
|
353
|
+
"name": "search_codebase"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"role": "assistant",
|
|
357
|
+
"content": "RELEASE_TITLE:\n1.0.4 — Silent-by-default logging and package metadata updates\n\nRELEASE_BODY:\n## Main changes\n\n### Logging: `DEFAULT_LOGGER` is now silent unless explicitly enabled\nThe library’s default logger has been changed to **discard all output by default** to reduce the risk of accidentally logging sensitive data.\n\nLogging is now only enabled when one of the following is true:\n- `AGENTIC_LOGGING=true`\n- `DEBUG` includes `agentic` (for example: `DEBUG=*agentic*`)\n- `NODE_ENV=development`\n\n**Why this matters**\n- **Safer defaults** for production usage (less chance of leaking tool inputs/outputs, secrets, etc.).\n- Still supports structured/masked logging via the Fjell-backed logger when enabled.\n\n**Impact**\n- If you previously relied on logs appearing without configuration, you may now see no output until you set one of the environment variables above.\n- This affects components that use the default logger internally (for example: `ToolGuard`, `ToolSandbox`, `ToolRegistry`, and `ContextManager`), since they wrap `DEFAULT_LOGGER`.\n\n### Package metadata/dependency adjustments\n- Updated `package.json` metadata and dependency declarations.\n- Version is now `1.0.4`.\n\n### Security documentation updates\n- `SECURITY.md` was updated to better document supported versions, security features, and recommended configuration (including logging enablement).\n\n## Breaking changes\nNo explicit API-breaking changes were detected in this range, but **the default logging behavior change** may be user-visible if your integration depended on default log output. To restore logs, set `AGENTIC_LOGGING=true` or configure `DEBUG`/`NODE_ENV` as described above."
|
|
358
|
+
}
|
|
359
|
+
]
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
</details>
|
|
363
|
+
|
|
364
|
+
## Generated Release Notes
|
|
365
|
+
|
|
366
|
+
### Title
|
|
367
|
+
```
|
|
368
|
+
1.0.4 — Silent-by-default logging and package metadata updates
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### Body
|
|
372
|
+
```markdown
|
|
373
|
+
## Main changes
|
|
374
|
+
|
|
375
|
+
### Logging: `DEFAULT_LOGGER` is now silent unless explicitly enabled
|
|
376
|
+
The library’s default logger has been changed to **discard all output by default** to reduce the risk of accidentally logging sensitive data.
|
|
377
|
+
|
|
378
|
+
Logging is now only enabled when one of the following is true:
|
|
379
|
+
- `AGENTIC_LOGGING=true`
|
|
380
|
+
- `DEBUG` includes `agentic` (for example: `DEBUG=*agentic*`)
|
|
381
|
+
- `NODE_ENV=development`
|
|
382
|
+
|
|
383
|
+
**Why this matters**
|
|
384
|
+
- **Safer defaults** for production usage (less chance of leaking tool inputs/outputs, secrets, etc.).
|
|
385
|
+
- Still supports structured/masked logging via the Fjell-backed logger when enabled.
|
|
386
|
+
|
|
387
|
+
**Impact**
|
|
388
|
+
- If you previously relied on logs appearing without configuration, you may now see no output until you set one of the environment variables above.
|
|
389
|
+
- This affects components that use the default logger internally (for example: `ToolGuard`, `ToolSandbox`, `ToolRegistry`, and `ContextManager`), since they wrap `DEFAULT_LOGGER`.
|
|
390
|
+
|
|
391
|
+
### Package metadata/dependency adjustments
|
|
392
|
+
- Updated `package.json` metadata and dependency declarations.
|
|
393
|
+
- Version is now `1.0.4`.
|
|
394
|
+
|
|
395
|
+
### Security documentation updates
|
|
396
|
+
- `SECURITY.md` was updated to better document supported versions, security features, and recommended configuration (including logging enablement).
|
|
397
|
+
|
|
398
|
+
## Breaking changes
|
|
399
|
+
No explicit API-breaking changes were detected in this range, but **the default logging behavior change** may be user-visible if your integration depended on default log output. To restore logs, set `AGENTIC_LOGGING=true` or configure `DEBUG`/`NODE_ENV` as described above.
|
|
400
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kjerneverk/agentic",
|
|
3
|
+
"version": "1.0.5-dev.0",
|
|
4
|
+
"_versionReset": "2026-01-15",
|
|
5
|
+
"description": "Shared agentic framework for multi-turn AI conversations and tool orchestration",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=24.0.0"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"clean": "rm -rf dist",
|
|
20
|
+
"build": "vite build",
|
|
21
|
+
"test": "vitest run --coverage",
|
|
22
|
+
"test:coverage": "vitest run --coverage",
|
|
23
|
+
"lint": "eslint src",
|
|
24
|
+
"precommit": "npm run build && npm run lint && npm run test",
|
|
25
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"agentic",
|
|
29
|
+
"ai",
|
|
30
|
+
"llm",
|
|
31
|
+
"conversation",
|
|
32
|
+
"tools",
|
|
33
|
+
"multi-turn",
|
|
34
|
+
"orchestration"
|
|
35
|
+
],
|
|
36
|
+
"author": "Tim O'Brien <tobrien@discursive.com>",
|
|
37
|
+
"license": "Apache-2.0",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "https://github.com/kjerneverk/agentic"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@fjell/logging": "^4.4.68",
|
|
44
|
+
"zod": "^4.3.6"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/node": "^25.0.6",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^8.33.1",
|
|
49
|
+
"@typescript-eslint/parser": "^8.33.1",
|
|
50
|
+
"@vitest/coverage-v8": "^4.0.16",
|
|
51
|
+
"ajv": "^8.17.1",
|
|
52
|
+
"eslint": "^9.28.0",
|
|
53
|
+
"globals": "^17.0.0",
|
|
54
|
+
"typescript": "^5.8.3",
|
|
55
|
+
"vite": "^7.0.4",
|
|
56
|
+
"vite-plugin-dts": "^4.5.4",
|
|
57
|
+
"vitest": "^4.0.16"
|
|
58
|
+
}
|
|
59
|
+
}
|
package/package.json~
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@riotprompt/agentic",
|
|
3
|
+
"version": "1.0.0-dev.0",
|
|
4
|
+
"_versionReset": "2026-01-15",
|
|
5
|
+
"description": "Shared agentic framework for multi-turn AI conversations and tool orchestration",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=24.0.0"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"clean": "rm -rf dist",
|
|
20
|
+
"build": "vite build",
|
|
21
|
+
"test": "vitest run --coverage",
|
|
22
|
+
"test:coverage": "vitest run --coverage",
|
|
23
|
+
"lint": "eslint src",
|
|
24
|
+
"precommit": "npm run build && npm run lint && npm run test",
|
|
25
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"agentic",
|
|
29
|
+
"ai",
|
|
30
|
+
"llm",
|
|
31
|
+
"conversation",
|
|
32
|
+
"tools",
|
|
33
|
+
"multi-turn",
|
|
34
|
+
"orchestration"
|
|
35
|
+
],
|
|
36
|
+
"author": "Tim O'Brien <tobrien@discursive.com>",
|
|
37
|
+
"license": "Apache-2.0",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "https://github.com/kjerneverk/agentic"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@fjell/logging": "^4.4.68",
|
|
44
|
+
"zod": "^4.3.5"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/node": "^25.0.6",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^8.33.1",
|
|
49
|
+
"@typescript-eslint/parser": "^8.33.1",
|
|
50
|
+
"@vitest/coverage-v8": "^4.0.16",
|
|
51
|
+
"eslint": "^9.28.0",
|
|
52
|
+
"globals": "^17.0.0",
|
|
53
|
+
"typescript": "^5.8.3",
|
|
54
|
+
"vite": "^7.0.4",
|
|
55
|
+
"vite-plugin-dts": "^4.5.4",
|
|
56
|
+
"vitest": "^4.0.16"
|
|
57
|
+
}
|
|
58
|
+
}
|