Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
20b779f
wip: spec created
alexkucherenko Oct 1, 2025
adab7d0
wip: first tasks
alexkucherenko Oct 1, 2025
af75f8b
wip: compilation issues fixed
alexkucherenko Oct 1, 2025
80ee6c4
wip: first tasks
alexkucherenko Oct 1, 2025
efca2d2
wip: more tasks implemented
alexkucherenko Oct 1, 2025
0a3d804
wip: manual testing scripts
alexkucherenko Oct 1, 2025
ba67df8
wip: better UI
alexkucherenko Oct 1, 2025
29bc299
wip: more tasks are done
alexkucherenko Oct 1, 2025
8de4bed
wip: tests fixed
alexkucherenko Oct 1, 2025
a2eef0f
wip: ollama and mcp server e2e tests
alexkucherenko Oct 1, 2025
1b7e1d4
wip: fixed compilation issues
alexkucherenko Oct 1, 2025
8942867
wip: connection ui to logic
alexkucherenko Oct 1, 2025
2501cdb
wip: cleanup
alexkucherenko Oct 2, 2025
733b82f
wip: enable tools for most of providers
alexkucherenko Oct 2, 2025
8e97134
wip: updated UI for tools support
alexkucherenko Oct 2, 2025
5b2d948
wip: improved UI
alexkucherenko Oct 2, 2025
3cea418
wip: fix attempts
alexkucherenko Oct 2, 2025
3294eb4
feat(mcp): add tool response parsers and conversation loop coordinator
alexkucherenko Oct 2, 2025
d5f0799
docs(mcp): add comprehensive implementation documentation
alexkucherenko Oct 2, 2025
c3bee0d
feat(mcp): add complete OpenAI provider adapter for tool calling
alexkucherenko Oct 2, 2025
8e9d52d
feat(providers): integrate autonomous tool calling into OpenAI provider
alexkucherenko Oct 2, 2025
4d0c245
docs(mcp): add comprehensive session documentation
alexkucherenko Oct 2, 2025
d297c19
feat(providers): integrate autonomous tool calling into Azure and Ope…
alexkucherenko Oct 2, 2025
4b9d74a
feat(providers): integrate autonomous tool calling into Ollama provider
alexkucherenko Oct 2, 2025
255e2da
wip: current moment review
alexkucherenko Oct 3, 2025
9e57944
wip: updated on review from openai side
alexkucherenko Oct 3, 2025
645dc4b
wip: updated review by grok side
alexkucherenko Oct 3, 2025
51dead6
wip: updated review by supernova side
alexkucherenko Oct 3, 2025
44191f2
wip: initial planing done by claude
alexkucherenko Oct 3, 2025
691b924
wip: planing updated by codex
alexkucherenko Oct 3, 2025
221d29c
wip: planing updated by supernova
alexkucherenko Oct 3, 2025
f8f2d44
wip: planing updated by grok 4
alexkucherenko Oct 3, 2025
fc9a115
wip: tasks document
alexkucherenko Oct 3, 2025
601455f
fix: resolve ID/name mismatch in MCP server initialization
alexkucherenko Oct 3, 2025
fc55bc5
feat: implement tool mapping cache and fix build issues
alexkucherenko Oct 3, 2025
2885f7b
wip: updated principles
alexkucherenko Oct 3, 2025
23e5259
wip: fixed unit tests
alexkucherenko Oct 3, 2025
a43fd0c
fix: exclude test files from TypeScript strict module resolution
alexkucherenko Oct 3, 2025
702c874
docs: update tasks tracking with build fix and current status
alexkucherenko Oct 3, 2025
a95803c
test: add health check timer orchestration tests
alexkucherenko Oct 3, 2025
e0bd5b7
test: add memory leak detection tests for executor
alexkucherenko Oct 3, 2025
5de0109
docs: complete Epic-100 release validation and sign-off
alexkucherenko Oct 3, 2025
6676146
feat: implement failure tracking for MCP servers
alexkucherenko Oct 3, 2025
100b787
feat: implement auto-disable logic for failed MCP servers
alexkucherenko Oct 3, 2025
cc48b23
feat: add SSE support via mcp-remote bridge
alexkucherenko Oct 3, 2025
dbcdab8
docs: add Epic-700 for Settings UI improvements
alexkucherenko Oct 3, 2025
6547443
feat(settings): add MCP config display toggle with SSE bridge support
alexkucherenko Oct 3, 2025
8cca674
feat(mcp): persist tool call markdown in coordinator
alexkucherenko Oct 3, 2025
9ac3246
wip: react migration plan
alexkucherenko Oct 3, 2025
627f2df
feat: complete Epic-200 core missing features and stabilize E2E tests
alexkucherenko Oct 3, 2025
ee4aa65
feat: complete Feature-700-10 config display mode toggle
alexkucherenko Oct 3, 2025
8e4ec0e
refactor: extract MCP settings UI to separate component
alexkucherenko Oct 3, 2025
3efd140
test: add settings UI tests and improve test infrastructure
alexkucherenko Oct 4, 2025
f12003e
docs: mark Feature-300-20 Memory Leak Prevention as complete
alexkucherenko Oct 4, 2025
c6fd4eb
feat: implement exponential backoff retry mechanism for MCP server er…
alexkucherenko Oct 4, 2025
ef27204
feat: implement tool execution cancellation support
alexkucherenko Oct 4, 2025
70dbb24
docs: complete Epic-300 Performance & Resource Management validation
alexkucherenko Oct 4, 2025
0188676
feat: implement Tool Browser Modal for MCP tool discovery
alexkucherenko Oct 4, 2025
690a332
docs: add Epic-800 Error Handling & Observability (CRITICAL)
alexkucherenko Oct 4, 2025
97f8b93
feat: implement comprehensive error logging and visibility (Feature-8…
alexkucherenko Oct 4, 2025
8492042
feat(mcp): implement MCP and tool error logging with status bar integ…
alexkucherenko Oct 4, 2025
6d8679d
feat(mcp): complete Epic-800 error handling & observability with UX i…
alexkucherenko Oct 4, 2025
e1d73e0
fix(mcp): env var substitution, tool-only generation, and exa server …
alexkucherenko Oct 4, 2025
aee02c2
wip: fixed ollama execution
alexkucherenko Oct 4, 2025
d4ab419
fix: tool calls start working
alexkucherenko Oct 4, 2025
b1bd09a
feat: add no-error states and improve error details UI with tabs
alexkucherenko Oct 4, 2025
dc7382f
feat(suggest): add MCP tool name auto-complete
alexkucherenko Oct 5, 2025
2914e21
wip: tool parameter suggest
alexkucherenko Oct 5, 2025
b8a8588
wip: logger implementation
alexkucherenko Oct 5, 2025
30befe9
feat(mcp): implement Feature-400-30 Enhanced Status Display
alexkucherenko Oct 6, 2025
a3bf10d
feat(mcp): implement Feature-400-40 Templated Inserts
alexkucherenko Oct 6, 2025
0843152
docs: synchronize task document with current progress
alexkucherenko Oct 6, 2025
a577aa1
docs(mcp): complete Epic-400 UX Enhancements validation and sign-off
alexkucherenko Oct 6, 2025
b0b5fc0
wip: update migrate to react plan
alexkucherenko Oct 6, 2025
de8f098
perf(mcp): make server initialization non-blocking to improve plugin …
alexkucherenko Oct 6, 2025
64d954f
wip: more tasks added
alexkucherenko Oct 6, 2025
a5a03c4
wip: updated planning
alexkucherenko Oct 7, 2025
0ca4838
feat(mcp): scope executor sessions per document
alexkucherenko Oct 9, 2025
a7951b5
feat(mcp): prompt session resets per document
alexkucherenko Oct 9, 2025
676168b
test(mcp): cover document session flows
alexkucherenko Oct 9, 2025
47dc27e
feat(mcp): add document tool result cache parser
alexkucherenko Oct 9, 2025
e61c474
feat(mcp): reuse cached tool results with confirmation
alexkucherenko Oct 9, 2025
d1f7808
feat: add collapsible sections to settings UI with persistent state
alexkucherenko Oct 9, 2025
8d97af3
feat: add conversion format detection for config display modes
alexkucherenko Oct 9, 2025
0af2439
refactor: replace command display mode toggle with format conversion …
alexkucherenko Oct 9, 2025
d24bb97
feat(mcp): add document session count display to status modal
alexkucherenko Oct 10, 2025
3482639
docs: add Epic-1000 for LLM provider connection testing
alexkucherenko Oct 10, 2025
ece00a4
feat(mcp): implement graceful server restart with multi-phase UI feed…
alexkucherenko Oct 10, 2025
87e2d1c
wip: planning
alexkucherenko Oct 10, 2025
131f877
feat(providers): add connection testing with UI button
alexkucherenko Oct 10, 2025
a64e78d
feat(mcp): add unified tool result formatting and improve parameter t…
alexkucherenko Oct 10, 2025
2c1cac5
feat(mcp): add parallel tool execution with p-limit concurrency control
alexkucherenko Oct 10, 2025
1ca8f47
refactor(mcp): simplify parallel execution by using maxParallelTools=…
alexkucherenko Oct 10, 2025
bf6f1fc
feat(mcp): add parallel execution settings UI and wire through all pr…
alexkucherenko Oct 10, 2025
b06e039
fix(settings): enable bidirectional switching between JSON and comman…
alexkucherenko Oct 10, 2025
8e53b59
fix(mcp): remove aggressive type coercion in Ollama tool parameter no…
alexkucherenko Oct 10, 2025
84e125c
test(mcp): add comprehensive parallel tool execution tests
alexkucherenko Oct 10, 2025
2db5352
docs: update task documents with Epic-500-10 completion status
alexkucherenko Oct 10, 2025
6448111
test(modals): add comprehensive tests for tool browser modal template…
alexkucherenko Oct 10, 2025
3404358
test(mcp): add comprehensive tests for tool result formatter
alexkucherenko Oct 10, 2025
6ff79f2
docs: mark Feature-900-60 and Feature-900-70 as complete
alexkucherenko Oct 10, 2025
e78ac9f
docs: mark Epic-1000-10 (LLM Provider Connection Testing) as complete
alexkucherenko Oct 10, 2025
62c47d5
feat(mcp): implement tool result caching with TTL and invalidation
alexkucherenko Oct 10, 2025
0ac75a2
feat(mcp): add cache UI integration for tool result caching
alexkucherenko Oct 10, 2025
302caec
feat: enhance tool call UI with collapsible callouts and YAML formatting
alexkucherenko Oct 10, 2025
3a15aca
feat: add LLM utility section with provider/model info and available …
alexkucherenko Oct 10, 2025
af3f1d2
fix: tools limits for -1
alexkucherenko Oct 10, 2025
c454f77
feat: implement concurrent text editing stream with anchor-aware muta…
alexkucherenko Oct 11, 2025
4340b1f
docs: planning for next steps, trello integration
alexkucherenko Oct 12, 2025
49ed5d8
chore: refactor typecheck scripts
alexkucherenko Oct 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
gh release create "$tag" \
--title="$tag" \
--draft \
main.js styles.css manifest.json
dist/main.js dist/manifest.json dist/styles.css
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
# npm
node_modules

# Don't include the compiled main.js file in the repo.
# Don't include the compiled files in the repo.
# They should be uploaded to GitHub releases instead.
main.js
dist/

# Exclude sourcemaps
*.map
Expand All @@ -25,3 +26,10 @@ data.json
quokka.ts
Makefile
archive/

# exclude MCP file from commit, it can contain secrets
mcp.json
.mcp.json

# code coverage
coverage/
6 changes: 0 additions & 6 deletions .prettierrc

This file was deleted.

223 changes: 223 additions & 0 deletions .specify/COMPLIANCE_CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
# Constitution Compliance Checklist

**Version**: 1.0.0 | **For**: Code Reviews & Pull Requests

Use this checklist to validate that code changes comply with the Tars Plugin Constitution before merging.

## 🧪 Test-Driven Development (CRITICAL)

### Pre-Implementation
- [ ] Tests were written **BEFORE** implementation code
- [ ] Tests initially **FAILED** (Red phase confirmed)
- [ ] Tests now **PASS** after implementation (Green phase)
- [ ] Code was refactored for clarity (Refactor phase if needed)

### Test Quality
- [ ] Every test uses **GIVEN / WHEN / THEN** pattern
- [ ] Each section (GIVEN/WHEN/THEN) is separated by blank lines
- [ ] Test comments explain **business purpose**, not just code mechanics
- [ ] Tests start with `// TEST: {clear description}`
- [ ] `AND:` is used for additional steps within sections
- [ ] Test file naming: `*.test.ts` in appropriate `tests/` subdirectory

### Example Validation
```typescript
// ✅ COMPLIANT
// TEST: Provider handles malformed API response gracefully
test('sendRequest catches and logs JSON parse errors', () => {
// GIVEN: API returns invalid JSON response
const mockResponse = "not valid json{"

// WHEN: Provider attempts to parse the response
const result = await provider.handleResponse(mockResponse)

// THEN: Error is caught and user is notified
expect(result.error).toBeDefined()
// AND: Error is logged for debugging
expect(console.error).toHaveBeenCalled()
})

// ❌ NON-COMPLIANT
test('parse error', () => {
const r = "bad json"
expect(() => parse(r)).toThrow() // No GIVEN/WHEN/THEN, no business context
})
```

## 🏗️ Plugin Architecture

### Module Organization
- [ ] New providers added to `src/providers/`
- [ ] New commands added to `src/commands/`
- [ ] Editor logic kept in `src/editor.ts` (not scattered)
- [ ] Settings changes reflected in `src/settings.ts` and `src/settingTab.ts`
- [ ] No business logic in UI components

### Provider Implementation
- [ ] Provider options interface **extends BaseOptions**
- [ ] `sendRequestFunc` returns **async generator** (uses `yield`)
- [ ] Streaming implemented token-by-token
- [ ] **AbortController** support implemented
- [ ] Error handling uses **Notice** for user feedback
- [ ] Capability emoji implemented via `getCapabilityEmoji()`
- [ ] Provider registered in `src/providers/index.ts`

### Tag-Based Interaction
- [ ] Tag syntax preserved: `#Role :` format
- [ ] Blank lines separate messages
- [ ] Callouts properly ignored
- [ ] Conversation order respected: System → User ↔ Assistant

## 📘 TypeScript Type Safety

### Strict Mode Compliance
- [ ] No `any` types (or explicitly justified in comments)
- [ ] No `@ts-ignore` (or explicitly justified in comments)
- [ ] All public functions have explicit return types
- [ ] All parameters have explicit types (no implicit `any`)
- [ ] Null/undefined handled explicitly (`strictNullChecks`)

### Type Definitions
- [ ] `interface` used for extensible contracts
- [ ] `type` used for unions/intersections/compositions
- [ ] Provider options extend `BaseOptions`
- [ ] Message types use `Message` interface from `./providers`

### Naming Conventions
- [ ] Classes/Interfaces/Types: **PascalCase** (`ClaudeOptions`)
- [ ] Functions/variables/properties: **camelCase** (`sendRequest`)
- [ ] Constants: **UPPER_SNAKE_CASE** (`DEFAULT_SETTINGS`)
- [ ] No `I` prefix on interfaces (use `BaseOptions`, not `IBaseOptions`)

## 🔍 Code Quality

### Linting
- [ ] `npm run lint` passes with **zero warnings**
- [ ] Prettier formatting applied: `npm run format`
- [ ] No unused variables (except `_` prefixed)
- [ ] ESLint rules from `eslint.config.mjs` followed

### Code Standards
- [ ] ES6 module syntax (`import`/`export`)
- [ ] Async/await for promises (not `.then()/.catch()`)
- [ ] Arrow functions for callbacks
- [ ] Template literals for string interpolation
- [ ] Destructuring used where appropriate

### Error Handling
- [ ] User-facing errors use `new Notice(t('message'))`
- [ ] Debug information logged to `console.debug` or `console.error`
- [ ] HTTP errors translated to helpful messages (401, 404, 429, etc.)
- [ ] All strings wrapped in `t()` for internationalization

## 🔗 Upstream Compatibility

### Architecture Preservation
- [ ] No breaking changes to existing provider interfaces
- [ ] Command registration pattern unchanged
- [ ] Settings structure compatible with upstream
- [ ] Tag syntax backwards compatible
- [ ] Plugin lifecycle hooks unchanged (`onload`, `onunload`)

### Configuration Matching
- [ ] `tsconfig.json` settings match upstream
- [ ] `eslint.config.mjs` rules match upstream
- [ ] Build configuration (`esbuild.config.mjs`) compatible
- [ ] `package.json` scripts unchanged (or documented)

### Documentation
- [ ] Deviations from upstream documented with rationale
- [ ] README updated if user-facing changes
- [ ] Provider-specific behavior documented
- [ ] Breaking changes clearly marked

## 🧹 Polish & Refinement

### Code Cleanliness
- [ ] No commented-out code blocks
- [ ] No `console.log` (use `console.debug` for dev logs)
- [ ] No TODOs without issue tracking
- [ ] Duplicate code refactored/extracted
- [ ] File length reasonable (<500 lines preferred)

### Testing Coverage
- [ ] Provider message formatting tested
- [ ] Tag parsing tested for edge cases
- [ ] Stream cancellation tested
- [ ] Error scenarios tested (network failures, invalid responses)
- [ ] Settings validation tested

### Performance
- [ ] No synchronous file I/O in hot paths
- [ ] Streaming chunks efficiently (not buffering entire response)
- [ ] Status bar updates don't block rendering
- [ ] Large responses don't freeze UI

## 📋 Pull Request Checklist

### Before Submitting
- [ ] All tests pass locally
- [ ] `npm run build` succeeds
- [ ] `npm run lint` passes (zero warnings)
- [ ] Manual testing in real Obsidian vault completed
- [ ] No merge conflicts with main branch

### PR Description
- [ ] Links to related issue/spec
- [ ] Describes WHAT changed and WHY
- [ ] Screenshots/GIFs for UI changes
- [ ] Breaking changes clearly called out
- [ ] Testing steps documented

### Reviewer Guidance
- [ ] TDD workflow evidence provided (commit history shows tests first)
- [ ] Constitution compliance verified (this checklist completed)
- [ ] Upstream compatibility assessed
- [ ] Performance impact considered

## 🚦 Gate Status

**Mark each gate as PASS/FAIL before merge:**

| Gate | Status | Notes |
|------|--------|-------|
| TDD Workflow | ⬜ PASS / ⬜ FAIL | Tests written before code? |
| Test Format | ⬜ PASS / ⬜ FAIL | GIVEN/WHEN/THEN with comments? |
| TypeScript Strict | ⬜ PASS / ⬜ FAIL | No `any`, explicit types? |
| Linting | ⬜ PASS / ⬜ FAIL | Zero warnings? |
| Architecture | ⬜ PASS / ⬜ FAIL | Modules in correct locations? |
| Upstream Compat | ⬜ PASS / ⬜ FAIL | No breaking changes? |
| Manual Testing | ⬜ PASS / ⬜ FAIL | Works in real Obsidian? |

**All gates must PASS before merge.**

## 🎯 Quick Validation Commands

```bash
# Run all quality checks
npm run lint # Must pass (zero warnings)
npm run build # Must succeed
npm test # Must pass (if test suite exists)

# Check TypeScript strict mode
grep -E "(noImplicitAny|strictNullChecks)" tsconfig.json
# Should show both set to true

# Find potential violations
grep -r "any" src/ # Check for any types
grep -r "@ts-ignore" src/ # Check for ts-ignore
grep -r "console.log" src/ # Check for debug logs
```

## 📚 Reference

- **Full Constitution**: `.specify/memory/constitution.md`
- **Quick Reference**: `.specify/QUICK_REFERENCE.md`
- **Constitution Summary**: `.specify/CONSTITUTION_SUMMARY.md`

---

**Remember**: This is a living document. Update it when the constitution changes.

**Version History**:
- v1.0.0 (2025-10-01): Initial checklist based on constitution v1.0.0
Loading