@floydous/pi-agent-kernel 0.4.2 → 0.5.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 (59) hide show
  1. package/AGENT_KERNEL_SYS_PROMPT.md +1 -7
  2. package/CHANGELOG.md +48 -0
  3. package/README.md +6 -53
  4. package/config.example.toml +0 -8
  5. package/docs/README.md +1 -2
  6. package/docs/architecture.md +2 -3
  7. package/docs/configuration.md +10 -9
  8. package/docs/editing-and-verification.md +1 -3
  9. package/docs/retrieval.md +6 -11
  10. package/docs/testing.md +3 -3
  11. package/package.json +4 -2
  12. package/src/config/agent_kernel_command.ts +8 -39
  13. package/src/config/kernel_config.ts +30 -68
  14. package/src/config/toml.ts +6 -1
  15. package/src/editing/auto_heal.ts +1 -1
  16. package/src/editing/patch.ts +27 -16
  17. package/src/editing/post_edit_verification.ts +12 -10
  18. package/src/editing/smart_anchor.ts +7 -5
  19. package/src/editing/syntax-verify.ts +117 -15
  20. package/src/index.ts +15 -257
  21. package/src/retrieval/search_bm25.ts +4 -2
  22. package/src/retrieval/search_chunker.ts +1 -1
  23. package/src/retrieval/search_config.ts +4 -6
  24. package/src/retrieval/search_embedder.ts +3 -2
  25. package/src/retrieval/search_index.ts +82 -35
  26. package/src/retrieval/search_modal.ts +7 -8
  27. package/src/retrieval/{repomap.ts → tag_extractor.ts} +5 -292
  28. package/src/retrieval/tree_sitter_engine.ts +70 -34
  29. package/src/retrieval/workspace_walker.ts +6 -2
  30. package/src/safety/atomic_write.ts +1 -1
  31. package/src/safety/epistemic_guard.ts +122 -32
  32. package/src/safety/output_clamper.ts +57 -35
  33. package/src/tools/code_search_output.ts +2 -1
  34. package/src/tools/code_search_tool.ts +2 -5
  35. package/src/tools/context.ts +0 -14
  36. package/src/tools/edit_tool.ts +82 -115
  37. package/src/tools/read_tool.ts +42 -178
  38. package/src/ui/footer.ts +7 -7
  39. package/docs/lsp.md +0 -31
  40. package/src/lsp/adapters/base.ts +0 -42
  41. package/src/lsp/adapters/index.ts +0 -21
  42. package/src/lsp/adapters/python.ts +0 -37
  43. package/src/lsp/adapters/rust.ts +0 -35
  44. package/src/lsp/adapters/typescript.ts +0 -40
  45. package/src/lsp/index.ts +0 -13
  46. package/src/lsp/lsp_client.ts +0 -765
  47. package/src/lsp/lsp_detector.ts +0 -52
  48. package/src/lsp/lsp_formatter.ts +0 -323
  49. package/src/lsp/lsp_installer.ts +0 -320
  50. package/src/lsp/lsp_manager.ts +0 -202
  51. package/src/lsp/lsp_modal.ts +0 -675
  52. package/src/lsp/lsp_registry.ts +0 -600
  53. package/src/lsp/lsp_types.ts +0 -143
  54. package/src/retrieval/ast_search.ts +0 -999
  55. package/src/retrieval/symbol_reader.ts +0 -228
  56. package/src/tools/ast_search_formatter.ts +0 -161
  57. package/src/tools/ast_search_tool.ts +0 -146
  58. package/src/tools/lsp_tool.ts +0 -794
  59. package/src/tools/repo_map_tool.ts +0 -56
@@ -1,143 +0,0 @@
1
- /**
2
- * Minimal, zero-dependency Language Server Protocol (LSP 3.17) Types
3
- */
4
-
5
- export interface LspPosition {
6
- line: number; // 0-based
7
- character: number; // 0-based
8
- }
9
-
10
- export interface LspRange {
11
- start: LspPosition;
12
- end: LspPosition;
13
- }
14
-
15
- export interface LspLocation {
16
- uri: string;
17
- range: LspRange;
18
- }
19
-
20
- export interface LspLocationLink {
21
- originSelectionRange?: LspRange;
22
- targetUri: string;
23
- targetRange: LspRange;
24
- targetSelectionRange: LspRange;
25
- }
26
-
27
- export enum LspDiagnosticSeverity {
28
- Error = 1,
29
- Warning = 2,
30
- Information = 3,
31
- Hint = 4,
32
- }
33
-
34
- export interface LspDiagnosticRelatedInformation {
35
- location: LspLocation;
36
- message: string;
37
- }
38
-
39
- export interface LspDiagnostic {
40
- range: LspRange;
41
- severity?: LspDiagnosticSeverity;
42
- code?: number | string;
43
- source?: string;
44
- message: string;
45
- relatedInformation?: LspDiagnosticRelatedInformation[];
46
- }
47
-
48
- export enum LspSymbolKind {
49
- File = 1,
50
- Module = 2,
51
- Namespace = 3,
52
- Package = 4,
53
- Class = 5,
54
- Method = 6,
55
- Property = 7,
56
- Field = 8,
57
- Constructor = 9,
58
- Enum = 10,
59
- Interface = 11,
60
- Function = 12,
61
- Variable = 13,
62
- Constant = 14,
63
- String = 15,
64
- Number = 16,
65
- Boolean = 17,
66
- Array = 18,
67
- Object = 19,
68
- Key = 20,
69
- Null = 21,
70
- EnumMember = 22,
71
- Struct = 23,
72
- Event = 24,
73
- Operator = 25,
74
- TypeParameter = 26,
75
- }
76
-
77
- export interface LspSymbolInformation {
78
- name: string;
79
- kind: LspSymbolKind;
80
- tags?: number[];
81
- location: LspLocation;
82
- containerName?: string;
83
- }
84
-
85
- export interface LspDocumentSymbol {
86
- name: string;
87
- detail?: string;
88
- kind: LspSymbolKind;
89
- tags?: number[];
90
- range: LspRange;
91
- selectionRange: LspRange;
92
- children?: LspDocumentSymbol[];
93
- }
94
-
95
- export interface LspMarkupContent {
96
- kind: "plaintext" | "markdown";
97
- value: string;
98
- }
99
-
100
- export interface LspHover {
101
- contents: LspMarkupContent | string | Array<LspMarkupContent | string>;
102
- range?: LspRange;
103
- }
104
-
105
- export interface LspServerCommand {
106
- bin: string;
107
- args: string[];
108
- env?: Record<string, string>;
109
- }
110
-
111
- export interface LspServerConfig {
112
- languageId: string;
113
- extensions: string[];
114
- markers: string[];
115
- commands: LspServerCommand[];
116
- installHint?: string;
117
- }
118
-
119
- export type LspClientState = "stopped" | "starting" | "ready" | "shutting_down" | "error";
120
-
121
- export interface LspRequest<T = any> {
122
- jsonrpc: "2.0";
123
- id: number | string;
124
- method: string;
125
- params?: T;
126
- }
127
-
128
- export interface LspResponse<T = any> {
129
- jsonrpc: "2.0";
130
- id: number | string | null;
131
- result?: T;
132
- error?: {
133
- code: number;
134
- message: string;
135
- data?: any;
136
- };
137
- }
138
-
139
- export interface LspNotification<T = any> {
140
- jsonrpc: "2.0";
141
- method: string;
142
- params?: T;
143
- }