@shanepadgett/tau-agent 0.33.0 → 0.34.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/docs/context.md +29 -20
- package/docs/extending-tau-agent.md +63 -24
- package/extensions/appshot/index.ts +112 -111
- package/extensions/aside/README.md +7 -0
- package/extensions/aside/index.ts +168 -0
- package/extensions/aside/panel.ts +83 -0
- package/extensions/branch/index.ts +38 -21
- package/extensions/cache-diagnostics/index.ts +70 -58
- package/extensions/checkpoint/README.md +9 -0
- package/extensions/checkpoint/checkpoint-budget.ts +79 -0
- package/extensions/checkpoint/checkpoint.ts +277 -0
- package/extensions/checkpoint/index.ts +102 -0
- package/extensions/checkpoint/messages.ts +169 -0
- package/extensions/checkpoint/prompt.ts +24 -0
- package/extensions/checkpoint/settings.ts +27 -0
- package/extensions/commit/commit-effort.ts +3 -3
- package/extensions/context/README.md +12 -8
- package/extensions/context/definitions.ts +178 -55
- package/extensions/context/index.ts +192 -160
- package/extensions/context/panel.ts +57 -37
- package/extensions/context/sync.ts +139 -89
- package/extensions/context/validation.ts +37 -25
- package/extensions/effort/README.md +1 -1
- package/extensions/effort/index.ts +3 -3
- package/extensions/effort/state.ts +3 -18
- package/extensions/explore/guidance.ts +6 -47
- package/extensions/explore/index.ts +38 -53
- package/extensions/explore/{ast/read → read}/hook.ts +12 -7
- package/extensions/explore/{ast/tools → tools}/ast-search.ts +15 -19
- package/extensions/explore/{ast/tools → tools}/context.ts +16 -23
- package/extensions/explore/{ast/tools → tools}/deps.ts +11 -15
- package/extensions/explore/{ast/tools → tools}/discover.ts +15 -17
- package/extensions/explore/{ast/tools → tools}/impact.ts +20 -23
- package/extensions/explore/{ast/tools → tools}/outline.ts +21 -24
- package/extensions/explore/{ast/tools → tools}/relationships.ts +23 -32
- package/extensions/explore/{ast/tools → tools}/render.ts +1 -1
- package/extensions/explore/{ast/tools → tools}/reverse-deps.ts +11 -15
- package/extensions/explore/{ast/tools → tools}/show.ts +16 -19
- package/extensions/explore/tools/target-params.ts +9 -0
- package/extensions/footer/index.ts +75 -56
- package/extensions/handoff/index.ts +8 -30
- package/extensions/image-gen/index.ts +46 -40
- package/extensions/patch/executor.ts +190 -135
- package/extensions/patch/matcher.ts +82 -48
- package/extensions/patch/parser.ts +149 -105
- package/extensions/patch/render.ts +32 -39
- package/extensions/patch/summary.ts +30 -26
- package/extensions/ready/README.md +7 -0
- package/extensions/ready/index.ts +58 -0
- package/extensions/ready/model.ts +128 -0
- package/extensions/ready/packs.ts +272 -0
- package/extensions/ready/render.ts +445 -0
- package/extensions/ready/scan.ts +760 -0
- package/extensions/reference/panel.ts +28 -16
- package/extensions/review/index.ts +63 -51
- package/extensions/review/panel.ts +5 -34
- package/extensions/runtime-context/context.ts +30 -26
- package/extensions/script-runner/README.md +2 -2
- package/extensions/script-runner/index.ts +130 -93
- package/extensions/silent-command-runner/index.ts +38 -23
- package/extensions/subagent/agents/context-sync.md +185 -33
- package/extensions/subagent/agents/scout.md +2 -2
- package/extensions/subagent/agents.ts +137 -84
- package/extensions/subagent/cmux-dashboard.ts +39 -30
- package/extensions/subagent/index.ts +79 -59
- package/extensions/subagent/resume.ts +1 -1
- package/extensions/subagent/run.ts +304 -193
- package/extensions/subagent/runtime.ts +781 -343
- package/extensions/tau/index.ts +47 -38
- package/extensions/tau-help/help.md +14 -6
- package/extensions/tool-loader/README.md +4 -2
- package/extensions/tool-loader/index.ts +77 -52
- package/extensions/web/index.ts +6 -3
- package/extensions/web/webfetch.ts +114 -86
- package/package.json +3 -3
- package/schemas/tau.schema.json +20 -33
- package/shared/bounded-text-result.ts +1 -0
- package/shared/checkpoint-visibility.ts +9 -0
- package/shared/events.ts +28 -10
- package/shared/isolated-session.ts +71 -29
- package/shared/model-effort.ts +9 -19
- package/shared/model-fallback/index.ts +66 -41
- package/shared/settings/load.ts +45 -38
- package/shared/temporary-output-store.ts +16 -10
- package/{extensions/explore → src}/ast/adapter.ts +11 -2
- package/{extensions/explore → src}/ast/engine.ts +54 -38
- package/{extensions/explore → src}/ast/format/ast-search.ts +15 -6
- package/{extensions/explore → src}/ast/format/context.ts +3 -6
- package/src/ast/format/deps.ts +94 -0
- package/{extensions/explore → src}/ast/format/discover.ts +2 -2
- package/{extensions/explore → src}/ast/format/impact.ts +9 -11
- package/{extensions/explore → src}/ast/format/outline.ts +2 -2
- package/{extensions/explore → src}/ast/format/relationships.ts +11 -7
- package/{extensions/explore → src}/ast/format/show.ts +1 -1
- package/src/ast/format/targeted-result.ts +20 -0
- package/src/ast/grammars/c_sharp.wasm +0 -0
- package/{extensions/explore → src}/ast/grammars/manifest.json +9 -12
- package/{extensions/explore → src}/ast/grammars/manifest.ts +0 -4
- package/{extensions/explore → src}/ast/graph/file-graph.ts +210 -98
- package/{extensions/explore → src}/ast/graph/relationships.ts +285 -72
- package/{extensions/explore → src}/ast/ir.ts +6 -0
- package/src/ast/languages/csharp-file-deps.ts +90 -0
- package/{extensions/explore → src}/ast/languages/csharp.ts +9 -40
- package/src/ast/languages/dotted-index.ts +131 -0
- package/{extensions/explore → src}/ast/languages/file-dep-util.ts +22 -13
- package/src/ast/languages/fixtures/sample.cs +53 -0
- package/src/ast/languages/fixtures/sample.cs.expected.json +156 -0
- package/src/ast/languages/fixtures/sample.go +37 -0
- package/src/ast/languages/fixtures/sample.go.expected.json +96 -0
- package/src/ast/languages/fixtures/sample.java +40 -0
- package/src/ast/languages/fixtures/sample.java.expected.json +126 -0
- package/src/ast/languages/fixtures/sample.kt +31 -0
- package/src/ast/languages/fixtures/sample.kt.expected.json +134 -0
- package/src/ast/languages/fixtures/sample.md +23 -0
- package/src/ast/languages/fixtures/sample.md.expected.json +44 -0
- package/src/ast/languages/fixtures/sample.rs +54 -0
- package/src/ast/languages/fixtures/sample.rs.expected.json +178 -0
- package/src/ast/languages/fixtures/sample.swift +45 -0
- package/src/ast/languages/fixtures/sample.swift.expected.json +147 -0
- package/src/ast/languages/fixtures/sample.ts +45 -0
- package/src/ast/languages/fixtures/sample.ts.expected.json +141 -0
- package/src/ast/languages/fixtures/sample.tsx +36 -0
- package/src/ast/languages/fixtures/sample.tsx.expected.json +59 -0
- package/{extensions/explore → src}/ast/languages/go-file-deps.ts +6 -0
- package/{extensions/explore → src}/ast/languages/go.ts +21 -3
- package/{extensions/explore → src}/ast/languages/java.ts +5 -38
- package/src/ast/languages/jvm-file-deps.ts +135 -0
- package/{extensions/explore → src}/ast/languages/kotlin.ts +5 -39
- package/{extensions/explore → src}/ast/languages/rust-file-deps.ts +3 -3
- package/{extensions/explore → src}/ast/languages/rust.ts +21 -13
- package/{extensions/explore → src}/ast/languages/swift-file-deps.ts +22 -15
- package/{extensions/explore → src}/ast/languages/swift.ts +9 -39
- package/{extensions/explore → src}/ast/languages/tree.ts +47 -0
- package/{extensions/explore → src}/ast/languages/typescript-file-deps.ts +108 -0
- package/{extensions/explore → src}/ast/languages/typescript-package-surface.ts +4 -3
- package/{extensions/explore → src}/ast/languages/typescript.ts +3 -5
- package/{extensions/explore → src}/ast/markdown.ts +72 -47
- package/{extensions/explore → src}/ast/queries/ast-search.ts +164 -146
- package/{extensions/explore → src}/ast/queries/composite-target.ts +1 -1
- package/{extensions/explore → src}/ast/queries/context.ts +116 -80
- package/{extensions/explore → src}/ast/queries/discover.ts +154 -105
- package/src/ast/queries/impact.ts +291 -0
- package/{extensions/explore → src}/ast/queries/outline.ts +4 -2
- package/{extensions/explore → src}/ast/queries/show.ts +46 -42
- package/{extensions/explore → src}/ast/query.ts +1 -1
- package/{extensions/explore → src}/ast/registry.ts +1 -2
- package/{extensions/explore → src}/ast/scan.ts +1 -1
- package/src/ast/session.ts +50 -0
- package/{extensions/explore → src}/ast/slice.ts +8 -0
- package/{extensions/explore → src/ast}/traverse.ts +32 -20
- package/src/file-injection/index.ts +547 -0
- package/src/image-generation/client.ts +50 -31
- package/src/image-generation/index.ts +177 -134
- package/src/index.ts +2 -0
- package/src/tool-loading/index.ts +58 -0
- package/extensions/context/evidence.ts +0 -517
- package/extensions/context/projection.ts +0 -141
- package/extensions/context/state.ts +0 -30
- package/extensions/context/write-scope.ts +0 -109
- package/extensions/explore/ast/format/deps.ts +0 -86
- package/extensions/explore/ast/grammars/odin.wasm +0 -0
- package/extensions/explore/ast/languages/csharp-file-deps.ts +0 -189
- package/extensions/explore/ast/languages/fixtures/sample.cs +0 -17
- package/extensions/explore/ast/languages/fixtures/sample.java +0 -21
- package/extensions/explore/ast/languages/fixtures/sample.kt +0 -15
- package/extensions/explore/ast/languages/fixtures/sample.odin +0 -28
- package/extensions/explore/ast/languages/fixtures/sample.rs +0 -31
- package/extensions/explore/ast/languages/fixtures/sample.swift +0 -25
- package/extensions/explore/ast/languages/jvm-file-deps.ts +0 -217
- package/extensions/explore/ast/languages/odin-file-deps.ts +0 -175
- package/extensions/explore/ast/languages/odin.ts +0 -407
- package/extensions/explore/ast/queries/impact.ts +0 -250
- package/extensions/explore/outline-injection.ts +0 -151
- package/extensions/explore/read/autoread.ts +0 -118
- package/extensions/working-memory/README.md +0 -17
- package/extensions/working-memory/checkpoint.ts +0 -242
- package/extensions/working-memory/index.ts +0 -341
- package/extensions/working-memory/memory.ts +0 -235
- package/extensions/working-memory/render.ts +0 -185
- package/extensions/working-memory/settings.ts +0 -38
- package/extensions/working-memory/state.ts +0 -158
- package/shared/autoread.ts +0 -234
- package/shared/context-messages.ts +0 -19
- package/shared/outline-injection.ts +0 -56
- /package/{extensions/explore → src}/ast/format/composite.ts +0 -0
- /package/{extensions/explore → src}/ast/grammars/kotlin.wasm +0 -0
- /package/{extensions/explore → src}/ast/grammars/swift.wasm +0 -0
- /package/{extensions/explore → src}/ast/identity.ts +0 -0
- /package/{extensions/explore → src}/ast/package-surface.ts +0 -0
- /package/{extensions/explore/ast/read/policy.ts → src/ast/read-policy.ts} +0 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"languageId": "java",
|
|
3
|
+
"parseDegraded": false,
|
|
4
|
+
"imports": [
|
|
5
|
+
"java.util.List",
|
|
6
|
+
"java.util.ArrayList"
|
|
7
|
+
],
|
|
8
|
+
"decls": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "class",
|
|
11
|
+
"qualifiedName": "Greeter",
|
|
12
|
+
"visibility": "public",
|
|
13
|
+
"exported": true,
|
|
14
|
+
"children": [
|
|
15
|
+
{
|
|
16
|
+
"kind": "field",
|
|
17
|
+
"qualifiedName": "Greeter.count",
|
|
18
|
+
"visibility": "private",
|
|
19
|
+
"exported": false,
|
|
20
|
+
"children": []
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"kind": "constant",
|
|
24
|
+
"qualifiedName": "Greeter.MAX",
|
|
25
|
+
"visibility": "public",
|
|
26
|
+
"exported": true,
|
|
27
|
+
"children": []
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"kind": "constructor",
|
|
31
|
+
"qualifiedName": "Greeter.Greeter",
|
|
32
|
+
"visibility": "public",
|
|
33
|
+
"exported": true,
|
|
34
|
+
"children": []
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"kind": "constructor",
|
|
38
|
+
"qualifiedName": "Greeter.Greeter",
|
|
39
|
+
"visibility": "public",
|
|
40
|
+
"exported": true,
|
|
41
|
+
"children": []
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"kind": "method",
|
|
45
|
+
"qualifiedName": "Greeter.hello",
|
|
46
|
+
"visibility": "public",
|
|
47
|
+
"exported": true,
|
|
48
|
+
"children": []
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"kind": "method",
|
|
52
|
+
"qualifiedName": "Greeter.name",
|
|
53
|
+
"visibility": "public",
|
|
54
|
+
"exported": true,
|
|
55
|
+
"children": []
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"kind": "interface",
|
|
61
|
+
"qualifiedName": "Named",
|
|
62
|
+
"visibility": "internal",
|
|
63
|
+
"exported": false,
|
|
64
|
+
"children": [
|
|
65
|
+
{
|
|
66
|
+
"kind": "method",
|
|
67
|
+
"qualifiedName": "Named.name",
|
|
68
|
+
"visibility": "public",
|
|
69
|
+
"exported": true,
|
|
70
|
+
"children": []
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"kind": "enum",
|
|
76
|
+
"qualifiedName": "Color",
|
|
77
|
+
"visibility": "internal",
|
|
78
|
+
"exported": false,
|
|
79
|
+
"children": [
|
|
80
|
+
{
|
|
81
|
+
"kind": "enumMember",
|
|
82
|
+
"qualifiedName": "Color.RED",
|
|
83
|
+
"visibility": "public",
|
|
84
|
+
"exported": true,
|
|
85
|
+
"children": []
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"kind": "enumMember",
|
|
89
|
+
"qualifiedName": "Color.GREEN",
|
|
90
|
+
"visibility": "public",
|
|
91
|
+
"exported": true,
|
|
92
|
+
"children": []
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"kind": "method",
|
|
96
|
+
"qualifiedName": "Color.paint",
|
|
97
|
+
"visibility": "internal",
|
|
98
|
+
"exported": false,
|
|
99
|
+
"children": []
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"kind": "class",
|
|
105
|
+
"qualifiedName": "Point",
|
|
106
|
+
"visibility": "internal",
|
|
107
|
+
"exported": false,
|
|
108
|
+
"children": []
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"kind": "interface",
|
|
112
|
+
"qualifiedName": "Internal",
|
|
113
|
+
"visibility": "internal",
|
|
114
|
+
"exported": false,
|
|
115
|
+
"children": [
|
|
116
|
+
{
|
|
117
|
+
"kind": "method",
|
|
118
|
+
"qualifiedName": "Internal.value",
|
|
119
|
+
"visibility": "public",
|
|
120
|
+
"exported": true,
|
|
121
|
+
"children": []
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
package com.demo
|
|
2
|
+
|
|
3
|
+
import kotlin.collections.List
|
|
4
|
+
|
|
5
|
+
/** Greeter */
|
|
6
|
+
class Greeter(val name: String) {
|
|
7
|
+
fun hello() {}
|
|
8
|
+
|
|
9
|
+
companion object {
|
|
10
|
+
fun create(): Greeter = Greeter("x")
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
internal fun top() {}
|
|
15
|
+
|
|
16
|
+
object Singleton {
|
|
17
|
+
const val ID = 1
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
enum class Color {
|
|
21
|
+
RED,
|
|
22
|
+
GREEN,
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface Named {
|
|
26
|
+
fun name(): String
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
data class Point(val x: Int, val y: Int)
|
|
30
|
+
|
|
31
|
+
typealias Alias = Greeter
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"languageId": "kotlin",
|
|
3
|
+
"parseDegraded": false,
|
|
4
|
+
"imports": [
|
|
5
|
+
"kotlin.collections.List"
|
|
6
|
+
],
|
|
7
|
+
"decls": [
|
|
8
|
+
{
|
|
9
|
+
"kind": "class",
|
|
10
|
+
"qualifiedName": "Greeter",
|
|
11
|
+
"visibility": "public",
|
|
12
|
+
"exported": true,
|
|
13
|
+
"children": [
|
|
14
|
+
{
|
|
15
|
+
"kind": "property",
|
|
16
|
+
"qualifiedName": "Greeter.name",
|
|
17
|
+
"visibility": "public",
|
|
18
|
+
"exported": true,
|
|
19
|
+
"children": []
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"kind": "method",
|
|
23
|
+
"qualifiedName": "Greeter.hello",
|
|
24
|
+
"visibility": "public",
|
|
25
|
+
"exported": true,
|
|
26
|
+
"children": []
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"kind": "object",
|
|
30
|
+
"qualifiedName": "Greeter.Companion",
|
|
31
|
+
"visibility": "public",
|
|
32
|
+
"exported": true,
|
|
33
|
+
"children": [
|
|
34
|
+
{
|
|
35
|
+
"kind": "method",
|
|
36
|
+
"qualifiedName": "Greeter.Companion.create",
|
|
37
|
+
"visibility": "public",
|
|
38
|
+
"exported": true,
|
|
39
|
+
"children": []
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"kind": "function",
|
|
47
|
+
"qualifiedName": "top",
|
|
48
|
+
"visibility": "internal",
|
|
49
|
+
"exported": false,
|
|
50
|
+
"children": []
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"kind": "object",
|
|
54
|
+
"qualifiedName": "Singleton",
|
|
55
|
+
"visibility": "public",
|
|
56
|
+
"exported": true,
|
|
57
|
+
"children": [
|
|
58
|
+
{
|
|
59
|
+
"kind": "constant",
|
|
60
|
+
"qualifiedName": "Singleton.ID",
|
|
61
|
+
"visibility": "public",
|
|
62
|
+
"exported": true,
|
|
63
|
+
"children": []
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"kind": "enum",
|
|
69
|
+
"qualifiedName": "Color",
|
|
70
|
+
"visibility": "public",
|
|
71
|
+
"exported": true,
|
|
72
|
+
"children": [
|
|
73
|
+
{
|
|
74
|
+
"kind": "enumMember",
|
|
75
|
+
"qualifiedName": "Color.RED",
|
|
76
|
+
"visibility": "public",
|
|
77
|
+
"exported": true,
|
|
78
|
+
"children": []
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"kind": "enumMember",
|
|
82
|
+
"qualifiedName": "Color.GREEN",
|
|
83
|
+
"visibility": "public",
|
|
84
|
+
"exported": true,
|
|
85
|
+
"children": []
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"kind": "interface",
|
|
91
|
+
"qualifiedName": "Named",
|
|
92
|
+
"visibility": "public",
|
|
93
|
+
"exported": true,
|
|
94
|
+
"children": [
|
|
95
|
+
{
|
|
96
|
+
"kind": "method",
|
|
97
|
+
"qualifiedName": "Named.name",
|
|
98
|
+
"visibility": "public",
|
|
99
|
+
"exported": true,
|
|
100
|
+
"children": []
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"kind": "class",
|
|
106
|
+
"qualifiedName": "Point",
|
|
107
|
+
"visibility": "public",
|
|
108
|
+
"exported": true,
|
|
109
|
+
"children": [
|
|
110
|
+
{
|
|
111
|
+
"kind": "property",
|
|
112
|
+
"qualifiedName": "Point.x",
|
|
113
|
+
"visibility": "public",
|
|
114
|
+
"exported": true,
|
|
115
|
+
"children": []
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"kind": "property",
|
|
119
|
+
"qualifiedName": "Point.y",
|
|
120
|
+
"visibility": "public",
|
|
121
|
+
"exported": true,
|
|
122
|
+
"children": []
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"kind": "typeAlias",
|
|
128
|
+
"qualifiedName": "Alias",
|
|
129
|
+
"visibility": "public",
|
|
130
|
+
"exported": true,
|
|
131
|
+
"children": []
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Explore
|
|
2
|
+
|
|
3
|
+
Top-level intro for the explore tools.
|
|
4
|
+
|
|
5
|
+
## Outline
|
|
6
|
+
|
|
7
|
+
Outline lists declarations in a file.
|
|
8
|
+
|
|
9
|
+
### Nested heading
|
|
10
|
+
|
|
11
|
+
Details under outline.
|
|
12
|
+
|
|
13
|
+
## Discover
|
|
14
|
+
|
|
15
|
+
Find symbols by name across a tree.
|
|
16
|
+
|
|
17
|
+
```md
|
|
18
|
+
# Not a real heading
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Search
|
|
22
|
+
|
|
23
|
+
Structural pattern search over source.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"languageId": "markdown",
|
|
3
|
+
"parseDegraded": false,
|
|
4
|
+
"imports": [],
|
|
5
|
+
"decls": [
|
|
6
|
+
{
|
|
7
|
+
"kind": "heading",
|
|
8
|
+
"qualifiedName": "Explore",
|
|
9
|
+
"visibility": "public",
|
|
10
|
+
"exported": true,
|
|
11
|
+
"children": [
|
|
12
|
+
{
|
|
13
|
+
"kind": "heading",
|
|
14
|
+
"qualifiedName": "Explore.Outline",
|
|
15
|
+
"visibility": "public",
|
|
16
|
+
"exported": true,
|
|
17
|
+
"children": [
|
|
18
|
+
{
|
|
19
|
+
"kind": "heading",
|
|
20
|
+
"qualifiedName": "Explore.Outline.Nested heading",
|
|
21
|
+
"visibility": "public",
|
|
22
|
+
"exported": true,
|
|
23
|
+
"children": []
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"kind": "heading",
|
|
29
|
+
"qualifiedName": "Explore.Discover",
|
|
30
|
+
"visibility": "public",
|
|
31
|
+
"exported": true,
|
|
32
|
+
"children": []
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"kind": "heading",
|
|
36
|
+
"qualifiedName": "Explore.Search",
|
|
37
|
+
"visibility": "public",
|
|
38
|
+
"exported": true,
|
|
39
|
+
"children": []
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
use std::fmt::Debug;
|
|
2
|
+
|
|
3
|
+
/// Point in 2D.
|
|
4
|
+
#[derive(Debug, Clone)]
|
|
5
|
+
pub struct Point {
|
|
6
|
+
pub x: i32,
|
|
7
|
+
y: i32,
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/// Drawable.
|
|
11
|
+
pub trait Draw {
|
|
12
|
+
fn draw(&self);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
impl Point {
|
|
16
|
+
/// Origin.
|
|
17
|
+
pub fn origin() -> Self {
|
|
18
|
+
Self { x: 0, y: 0 }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
pub fn translate(&mut self, dx: i32, dy: i32) {
|
|
22
|
+
self.x += dx;
|
|
23
|
+
self.y += dy;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
impl Draw for Point {
|
|
28
|
+
fn draw(&self) {}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
impl Default for Point {
|
|
32
|
+
fn default() -> Self {
|
|
33
|
+
Self::origin()
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
pub mod nested {
|
|
38
|
+
pub fn inner() {}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
pub enum Color {
|
|
42
|
+
Red,
|
|
43
|
+
Green,
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
pub const MAX: i32 = 10;
|
|
47
|
+
pub type Alias = i32;
|
|
48
|
+
|
|
49
|
+
pub union Bits {
|
|
50
|
+
i: i32,
|
|
51
|
+
f: f32,
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
fn private_fn() {}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
{
|
|
2
|
+
"languageId": "rust",
|
|
3
|
+
"parseDegraded": false,
|
|
4
|
+
"imports": [
|
|
5
|
+
"std::fmt::Debug"
|
|
6
|
+
],
|
|
7
|
+
"decls": [
|
|
8
|
+
{
|
|
9
|
+
"kind": "struct",
|
|
10
|
+
"qualifiedName": "Point",
|
|
11
|
+
"visibility": "public",
|
|
12
|
+
"exported": true,
|
|
13
|
+
"children": [
|
|
14
|
+
{
|
|
15
|
+
"kind": "field",
|
|
16
|
+
"qualifiedName": "Point.x",
|
|
17
|
+
"visibility": "public",
|
|
18
|
+
"exported": true,
|
|
19
|
+
"children": []
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"kind": "field",
|
|
23
|
+
"qualifiedName": "Point.y",
|
|
24
|
+
"visibility": "private",
|
|
25
|
+
"exported": false,
|
|
26
|
+
"children": []
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"kind": "interface",
|
|
32
|
+
"qualifiedName": "Draw",
|
|
33
|
+
"visibility": "public",
|
|
34
|
+
"exported": true,
|
|
35
|
+
"children": [
|
|
36
|
+
{
|
|
37
|
+
"kind": "method",
|
|
38
|
+
"qualifiedName": "Draw.draw",
|
|
39
|
+
"visibility": "private",
|
|
40
|
+
"exported": false,
|
|
41
|
+
"children": []
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"kind": "class",
|
|
47
|
+
"qualifiedName": "impl Point",
|
|
48
|
+
"visibility": "public",
|
|
49
|
+
"exported": true,
|
|
50
|
+
"children": [
|
|
51
|
+
{
|
|
52
|
+
"kind": "method",
|
|
53
|
+
"qualifiedName": "Point.origin",
|
|
54
|
+
"visibility": "public",
|
|
55
|
+
"exported": true,
|
|
56
|
+
"children": []
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"kind": "method",
|
|
60
|
+
"qualifiedName": "Point.translate",
|
|
61
|
+
"visibility": "public",
|
|
62
|
+
"exported": true,
|
|
63
|
+
"children": []
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"kind": "class",
|
|
69
|
+
"qualifiedName": "impl Draw for Point",
|
|
70
|
+
"visibility": "private",
|
|
71
|
+
"exported": false,
|
|
72
|
+
"children": [
|
|
73
|
+
{
|
|
74
|
+
"kind": "method",
|
|
75
|
+
"qualifiedName": "Point.draw",
|
|
76
|
+
"visibility": "private",
|
|
77
|
+
"exported": false,
|
|
78
|
+
"children": []
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"kind": "class",
|
|
84
|
+
"qualifiedName": "impl Default for Point",
|
|
85
|
+
"visibility": "private",
|
|
86
|
+
"exported": false,
|
|
87
|
+
"children": [
|
|
88
|
+
{
|
|
89
|
+
"kind": "method",
|
|
90
|
+
"qualifiedName": "Point.default",
|
|
91
|
+
"visibility": "private",
|
|
92
|
+
"exported": false,
|
|
93
|
+
"children": []
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"kind": "module",
|
|
99
|
+
"qualifiedName": "nested",
|
|
100
|
+
"visibility": "public",
|
|
101
|
+
"exported": true,
|
|
102
|
+
"children": [
|
|
103
|
+
{
|
|
104
|
+
"kind": "function",
|
|
105
|
+
"qualifiedName": "nested.inner",
|
|
106
|
+
"visibility": "public",
|
|
107
|
+
"exported": true,
|
|
108
|
+
"children": []
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"kind": "enum",
|
|
114
|
+
"qualifiedName": "Color",
|
|
115
|
+
"visibility": "public",
|
|
116
|
+
"exported": true,
|
|
117
|
+
"children": [
|
|
118
|
+
{
|
|
119
|
+
"kind": "enumMember",
|
|
120
|
+
"qualifiedName": "Color.Red",
|
|
121
|
+
"visibility": "public",
|
|
122
|
+
"exported": true,
|
|
123
|
+
"children": []
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"kind": "enumMember",
|
|
127
|
+
"qualifiedName": "Color.Green",
|
|
128
|
+
"visibility": "public",
|
|
129
|
+
"exported": true,
|
|
130
|
+
"children": []
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"kind": "constant",
|
|
136
|
+
"qualifiedName": "MAX",
|
|
137
|
+
"visibility": "public",
|
|
138
|
+
"exported": true,
|
|
139
|
+
"children": []
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"kind": "typeAlias",
|
|
143
|
+
"qualifiedName": "Alias",
|
|
144
|
+
"visibility": "public",
|
|
145
|
+
"exported": true,
|
|
146
|
+
"children": []
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"kind": "struct",
|
|
150
|
+
"qualifiedName": "Bits",
|
|
151
|
+
"visibility": "public",
|
|
152
|
+
"exported": true,
|
|
153
|
+
"children": [
|
|
154
|
+
{
|
|
155
|
+
"kind": "field",
|
|
156
|
+
"qualifiedName": "Bits.i",
|
|
157
|
+
"visibility": "private",
|
|
158
|
+
"exported": false,
|
|
159
|
+
"children": []
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"kind": "field",
|
|
163
|
+
"qualifiedName": "Bits.f",
|
|
164
|
+
"visibility": "private",
|
|
165
|
+
"exported": false,
|
|
166
|
+
"children": []
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"kind": "function",
|
|
172
|
+
"qualifiedName": "private_fn",
|
|
173
|
+
"visibility": "private",
|
|
174
|
+
"exported": false,
|
|
175
|
+
"children": []
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
|
|
3
|
+
/// Greeter type
|
|
4
|
+
public class Greeter: Named {
|
|
5
|
+
public var name: String = ""
|
|
6
|
+
|
|
7
|
+
public init() {}
|
|
8
|
+
|
|
9
|
+
public init(name: String) {
|
|
10
|
+
self.name = name
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public func hello() {
|
|
14
|
+
print("hi \(name)")
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
deinit {}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
extension Greeter {
|
|
21
|
+
public func shout() {
|
|
22
|
+
print(name.uppercased())
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public protocol Named {
|
|
27
|
+
var name: String { get }
|
|
28
|
+
func nameLabel()
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
internal struct Box {
|
|
32
|
+
var value: Int
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
private enum Color {
|
|
36
|
+
case red
|
|
37
|
+
case green
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public typealias Alias = Greeter
|
|
41
|
+
|
|
42
|
+
public enum Result {
|
|
43
|
+
case ok(Int)
|
|
44
|
+
case err(String)
|
|
45
|
+
}
|