Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T04:14:19.108Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

dap.wit

132 lines · 4.6 KB · text
1interface dap {
2    use common.{env-vars};
3
4    /// Resolves a specified TcpArgumentsTemplate into TcpArguments
5    resolve-tcp-template: func(template: tcp-arguments-template) -> result<tcp-arguments, string>;
6
7    record launch-request {
8        program: string,
9        cwd: option<string>,
10        args: list<string>,
11        envs: env-vars,
12    }
13
14    record attach-request {
15        process-id: option<u32>,
16    }
17
18    variant debug-request {
19        launch(launch-request),
20        attach(attach-request)
21    }
22
23    type ipv4-address = tuple<u8, u8, u8, u8>;
24    type ipv6-address = tuple<u16, u16, u16, u16, u16, u16, u16, u16>;
25
26    variant ip-address {
27        ipv4(ipv4-address),
28        ipv6(ipv6-address),
29    }
30
31    record tcp-arguments {
32        port: u16,
33        host: ip-address,
34        timeout: option<u64>,
35    }
36
37    record tcp-arguments-template {
38        port: option<u16>,
39        host: option<ip-address>,
40        timeout: option<u64>,
41    }
42
43    /// Debug Config is the "highest-level" configuration for a debug session.
44    /// It comes from a new process modal UI; thus, it is essentially debug-adapter-agnostic.
45    /// It is expected of the extension to translate this generic configuration into something that can be debugged by the adapter (debug scenario).
46    record debug-config {
47        /// Name of the debug task
48        label: string,
49        /// The debug adapter to use
50        adapter: string,
51        request: debug-request,
52        stop-on-entry: option<bool>,
53    }
54
55    record task-template {
56        /// Human readable name of the task to display in the UI.
57        label: string,
58        /// Executable command to spawn.
59        command: string,
60        args: list<string>,
61        env: env-vars,
62        cwd: option<string>,
63    }
64
65    /// A task template with substituted task variables.
66    type resolved-task = task-template;
67
68    /// A task template for building a debug target.
69    type build-task-template = task-template;
70
71    variant build-task-definition {
72        by-name(string),
73        template(build-task-definition-template-payload )
74    }
75    record build-task-definition-template-payload {
76        locator-name: option<string>,
77        template: build-task-template
78    }
79
80    /// Debug Scenario is the user-facing configuration type (used in debug.json). It is still concerned with what to debug and not necessarily how to do it (except for any
81    /// debug-adapter-specific configuration options).
82    record debug-scenario {
83        /// Unsubstituted label for the task.DebugAdapterBinary
84        label: string,
85        /// Name of the Debug Adapter this configuration is intended for.
86        adapter: string,
87        /// An optional build step to be ran prior to starting a debug session. Build steps are used by Zed's locators to locate the executable to debug.
88        build: option<build-task-definition>,
89        /// JSON-encoded configuration for a given debug adapter.
90        config: string,
91        /// TCP connection parameters (if they were specified by user)
92        tcp-connection: option<tcp-arguments-template>,
93    }
94
95    enum start-debugging-request-arguments-request {
96        launch,
97        attach,
98    }
99
100    record debug-task-definition {
101        /// Unsubstituted label for the task.DebugAdapterBinary
102        label: string,
103        /// Name of the Debug Adapter this configuration is intended for.
104        adapter: string,
105        /// JSON-encoded configuration for a given debug adapter.
106        config: string,
107        /// TCP connection parameters (if they were specified by user)
108        tcp-connection: option<tcp-arguments-template>,
109    }
110
111    record start-debugging-request-arguments {
112        /// JSON-encoded configuration for a given debug adapter. It is specific to each debug adapter.
113        /// `configuration` will have it's Zed variable references substituted prior to being passed to the debug adapter.
114        configuration: string,
115        request: start-debugging-request-arguments-request,
116    }
117
118    /// The lowest-level representation of a debug session, which specifies:
119    /// - How to start a debug adapter process
120    /// - How to start a debug session with it (using DAP protocol)
121    /// for a given debug scenario.
122    record debug-adapter-binary {
123        command: option<string>,
124        arguments: list<string>,
125        envs: env-vars,
126        cwd: option<string>,
127        /// Zed will use TCP transport if `connection` is specified.
128        connection: option<tcp-arguments>,
129        request-args: start-debugging-request-arguments
130    }
131}
132
Served at tenant.openagents/omega Member data and write actions are omitted.