@floydous/pi-agent-kernel 0.4.3 → 0.6.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 (65) hide show
  1. package/AGENT_KERNEL_SYS_PROMPT.md +15 -12
  2. package/CHANGELOG.md +87 -0
  3. package/README.md +6 -54
  4. package/config.example.toml +1 -8
  5. package/docs/README.md +1 -2
  6. package/docs/architecture.md +2 -3
  7. package/docs/configuration.md +11 -10
  8. package/docs/editing-and-verification.md +21 -8
  9. package/docs/podman-linux-checks.md +24 -0
  10. package/docs/release-discipline.md +10 -0
  11. package/docs/retrieval.md +21 -23
  12. package/docs/testing.md +3 -3
  13. package/grammars/tree-sitter-html.wasm +0 -0
  14. package/package.json +5 -3
  15. package/src/config/agent_kernel_command.ts +60 -625
  16. package/src/config/kernel_config.ts +53 -69
  17. package/src/config/toml.ts +6 -1
  18. package/src/editing/auto_heal.ts +1 -1
  19. package/src/editing/patch.ts +75 -37
  20. package/src/editing/post_edit_verification.ts +20 -14
  21. package/src/editing/smart_anchor.ts +9 -6
  22. package/src/editing/syntax-verify.ts +79 -222
  23. package/src/index.ts +36 -453
  24. package/src/retrieval/html_chunker.ts +526 -0
  25. package/src/retrieval/search_bm25.ts +39 -28
  26. package/src/retrieval/search_chunker.ts +69 -7
  27. package/src/retrieval/search_config.ts +21 -40
  28. package/src/retrieval/search_embedder.ts +14 -31
  29. package/src/retrieval/search_index.ts +338 -129
  30. package/src/retrieval/search_modal.ts +1208 -222
  31. package/src/retrieval/{repomap.ts → tag_extractor.ts} +6 -293
  32. package/src/retrieval/tree_sitter_engine.ts +171 -36
  33. package/src/retrieval/workspace_walker.ts +78 -2
  34. package/src/safety/atomic_write.ts +1 -1
  35. package/src/safety/epistemic_guard.ts +105 -31
  36. package/src/safety/host_environment.ts +180 -0
  37. package/src/safety/output_clamper.ts +97 -27
  38. package/src/tools/code_search_output.ts +11 -2
  39. package/src/tools/code_search_tool.ts +25 -13
  40. package/src/tools/context.ts +11 -10
  41. package/src/tools/edit_tool.ts +243 -154
  42. package/src/tools/read_tool.ts +285 -214
  43. package/src/tools/stream_reader.ts +206 -0
  44. package/src/ui/footer.ts +7 -7
  45. package/docs/lsp.md +0 -31
  46. package/src/lsp/adapters/base.ts +0 -42
  47. package/src/lsp/adapters/index.ts +0 -21
  48. package/src/lsp/adapters/python.ts +0 -37
  49. package/src/lsp/adapters/rust.ts +0 -35
  50. package/src/lsp/adapters/typescript.ts +0 -40
  51. package/src/lsp/index.ts +0 -13
  52. package/src/lsp/lsp_client.ts +0 -765
  53. package/src/lsp/lsp_detector.ts +0 -52
  54. package/src/lsp/lsp_formatter.ts +0 -323
  55. package/src/lsp/lsp_installer.ts +0 -320
  56. package/src/lsp/lsp_manager.ts +0 -202
  57. package/src/lsp/lsp_modal.ts +0 -675
  58. package/src/lsp/lsp_registry.ts +0 -600
  59. package/src/lsp/lsp_types.ts +0 -143
  60. package/src/retrieval/ast_search.ts +0 -999
  61. package/src/retrieval/symbol_reader.ts +0 -228
  62. package/src/tools/ast_search_formatter.ts +0 -161
  63. package/src/tools/ast_search_tool.ts +0 -146
  64. package/src/tools/lsp_tool.ts +0 -794
  65. 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
- }