Skip to content

Commit 2144fca

Browse files
committed
chore: gofmt -s the touched files
Mechanical realignment of column whitespace in the IPC opcode const blocks (adding CmdSetWebhookTopics / cmdSetWebhookTopics shifted the longest-name width, gofmt re-tabbed every neighbor) plus matching re-tab in cmd/daemon/main.go, internal/skillinject/manifest.go, plugin_allowlist.go, state.go, and zz_webhook_route_test.go. No semantic changes; existing tests pass.
1 parent 3211163 commit 2144fca

7 files changed

Lines changed: 88 additions & 89 deletions

File tree

cmd/daemon/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,9 @@ func main() {
230230
// than in the plugin to keep the plugin free of pkg/daemon imports.
231231
type webhookManagerAdapter struct{ svc *webhook.Service }
232232

233-
func (a webhookManagerAdapter) SetURL(url string) { a.svc.SetURL(url) }
234-
func (a webhookManagerAdapter) SetTopics(topics []string) { a.svc.SetTopics(topics) }
235-
func (a webhookManagerAdapter) Topics() []string { return a.svc.Topics() }
233+
func (a webhookManagerAdapter) SetURL(url string) { a.svc.SetURL(url) }
234+
func (a webhookManagerAdapter) SetTopics(topics []string) { a.svc.SetTopics(topics) }
235+
func (a webhookManagerAdapter) Topics() []string { return a.svc.Topics() }
236236
func (a webhookManagerAdapter) Stats() daemon.WebhookStats {
237237
s := a.svc.Stats()
238238
return daemon.WebhookStats{Dropped: s.Dropped, CircuitSkips: s.CircuitSkips}

internal/skillinject/manifest.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ type ManifestHelper struct {
5555

5656
// ManifestTool is one tool target row.
5757
type ManifestTool struct {
58-
Name string `json:"name"`
59-
RootDir string `json:"rootDir"`
60-
SkillsDir string `json:"skillsDir"`
61-
HeartbeatPath string `json:"heartbeatPath,omitempty"`
62-
HeartbeatTemplate string `json:"heartbeatTemplate,omitempty"`
63-
SkillNaming string `json:"skillNaming,omitempty"` // "" = "directory" (default), "flat" = single-file
64-
SelfHeartbeat bool `json:"selfHeartbeat,omitempty"`
58+
Name string `json:"name"`
59+
RootDir string `json:"rootDir"`
60+
SkillsDir string `json:"skillsDir"`
61+
HeartbeatPath string `json:"heartbeatPath,omitempty"`
62+
HeartbeatTemplate string `json:"heartbeatTemplate,omitempty"`
63+
SkillNaming string `json:"skillNaming,omitempty"` // "" = "directory" (default), "flat" = single-file
64+
SelfHeartbeat bool `json:"selfHeartbeat,omitempty"`
6565
// Plugin is the single-plugin slot. Kept for backwards compat with
6666
// pre-multi-plugin manifests. Prefer Plugins for new entries.
6767
Plugin *ManifestPlugin `json:"plugin,omitempty"`

internal/skillinject/plugin_allowlist.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func mergePluginAllowList(configPath, allowJsonPath, entriesJsonPath, pluginID s
9999
// `originalBytes` is our point-of-no-return — every failure
100100
// path below restores or aborts cleanly.
101101
var (
102-
originalBytes []byte
102+
originalBytes []byte
103103
originalExisted bool
104104
obj map[string]any
105105
)

internal/skillinject/state.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ const (
3434
type FileKind string
3535

3636
const (
37-
KindSkill FileKind = "skill"
38-
KindMarker FileKind = "marker"
39-
KindHelper FileKind = "helper"
40-
KindPluginFile FileKind = "plugin_file"
41-
KindPluginAllowList FileKind = "plugin_allowlist"
42-
KindWebhookRoute FileKind = "webhook_route"
43-
KindWebhookURL FileKind = "webhook_url"
37+
KindSkill FileKind = "skill"
38+
KindMarker FileKind = "marker"
39+
KindHelper FileKind = "helper"
40+
KindPluginFile FileKind = "plugin_file"
41+
KindPluginAllowList FileKind = "plugin_allowlist"
42+
KindWebhookRoute FileKind = "webhook_route"
43+
KindWebhookURL FileKind = "webhook_url"
4444
)
4545

4646
func actionFor(s State) Action {

internal/skillinject/zz_webhook_route_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,4 +224,3 @@ func TestManifest_WebhookRoutesUnmarshal(t *testing.T) {
224224
t.Fatalf("Route.secret=%v", wr[0].Route["secret"])
225225
}
226226
}
227-

pkg/daemon/ipc.go

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -21,46 +21,46 @@ import (
2121

2222
// IPC commands (daemon ↔ driver)
2323
const (
24-
CmdBind byte = 0x01
25-
CmdBindOK byte = 0x02
26-
CmdDial byte = 0x03
27-
CmdDialOK byte = 0x04
28-
CmdAccept byte = 0x05
29-
CmdSend byte = 0x06
30-
CmdRecv byte = 0x07
31-
CmdClose byte = 0x08
32-
CmdCloseOK byte = 0x09
33-
CmdError byte = 0x0A
34-
CmdSendTo byte = 0x0B
35-
CmdRecvFrom byte = 0x0C
36-
CmdInfo byte = 0x0D
37-
CmdInfoOK byte = 0x0E
38-
CmdHandshake byte = 0x0F // driver → daemon: handshake request/approve/reject
39-
CmdHandshakeOK byte = 0x10
40-
CmdResolveHostname byte = 0x11
41-
CmdResolveHostnameOK byte = 0x12
42-
CmdSetHostname byte = 0x13
43-
CmdSetHostnameOK byte = 0x14
44-
CmdSetVisibility byte = 0x15
45-
CmdSetVisibilityOK byte = 0x16
46-
CmdDeregister byte = 0x17
47-
CmdDeregisterOK byte = 0x18
48-
CmdSetTags byte = 0x19
49-
CmdSetTagsOK byte = 0x1A
24+
CmdBind byte = 0x01
25+
CmdBindOK byte = 0x02
26+
CmdDial byte = 0x03
27+
CmdDialOK byte = 0x04
28+
CmdAccept byte = 0x05
29+
CmdSend byte = 0x06
30+
CmdRecv byte = 0x07
31+
CmdClose byte = 0x08
32+
CmdCloseOK byte = 0x09
33+
CmdError byte = 0x0A
34+
CmdSendTo byte = 0x0B
35+
CmdRecvFrom byte = 0x0C
36+
CmdInfo byte = 0x0D
37+
CmdInfoOK byte = 0x0E
38+
CmdHandshake byte = 0x0F // driver → daemon: handshake request/approve/reject
39+
CmdHandshakeOK byte = 0x10
40+
CmdResolveHostname byte = 0x11
41+
CmdResolveHostnameOK byte = 0x12
42+
CmdSetHostname byte = 0x13
43+
CmdSetHostnameOK byte = 0x14
44+
CmdSetVisibility byte = 0x15
45+
CmdSetVisibilityOK byte = 0x16
46+
CmdDeregister byte = 0x17
47+
CmdDeregisterOK byte = 0x18
48+
CmdSetTags byte = 0x19
49+
CmdSetTagsOK byte = 0x1A
5050
CmdSetWebhook byte = 0x1B
5151
CmdSetWebhookOK byte = 0x1C
5252
CmdSetWebhookTopics byte = 0x1D
5353
CmdSetWebhookTopicsOK byte = 0x1E
5454
CmdNetwork byte = 0x1F
55-
CmdNetworkOK byte = 0x20
56-
CmdHealth byte = 0x21
57-
CmdHealthOK byte = 0x22
58-
CmdManaged byte = 0x23
59-
CmdManagedOK byte = 0x24
60-
CmdRotateKey byte = 0x25
61-
CmdRotateKeyOK byte = 0x26
62-
CmdBroadcast byte = 0x29
63-
CmdBroadcastOK byte = 0x2A
55+
CmdNetworkOK byte = 0x20
56+
CmdHealth byte = 0x21
57+
CmdHealthOK byte = 0x22
58+
CmdManaged byte = 0x23
59+
CmdManagedOK byte = 0x24
60+
CmdRotateKey byte = 0x25
61+
CmdRotateKeyOK byte = 0x26
62+
CmdBroadcast byte = 0x29
63+
CmdBroadcastOK byte = 0x2A
6464
// CmdCancel: driver → daemon, "abandon the in-flight request that
6565
// I sent under reqID X". The reqID embedded in the envelope header
6666
// IS NOT the reqID being cancelled — that's encoded in the body

pkg/driver/ipc.go

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,46 @@ import (
1515

1616
// IPC commands (must match daemon/ipc.go)
1717
const (
18-
cmdBind byte = 0x01
19-
cmdBindOK byte = 0x02
20-
cmdDial byte = 0x03
21-
cmdDialOK byte = 0x04
22-
cmdAccept byte = 0x05
23-
cmdSend byte = 0x06
24-
cmdRecv byte = 0x07
25-
cmdClose byte = 0x08
26-
cmdCloseOK byte = 0x09
27-
cmdError byte = 0x0A
28-
cmdSendTo byte = 0x0B
29-
cmdRecvFrom byte = 0x0C
30-
cmdInfo byte = 0x0D
31-
cmdInfoOK byte = 0x0E
32-
cmdHandshake byte = 0x0F
33-
cmdHandshakeOK byte = 0x10
34-
cmdResolveHostname byte = 0x11
35-
cmdResolveHostnameOK byte = 0x12
36-
cmdSetHostname byte = 0x13
37-
cmdSetHostnameOK byte = 0x14
38-
cmdSetVisibility byte = 0x15
39-
cmdSetVisibilityOK byte = 0x16
40-
cmdDeregister byte = 0x17
41-
cmdDeregisterOK byte = 0x18
42-
cmdSetTags byte = 0x19
43-
cmdSetTagsOK byte = 0x1A
18+
cmdBind byte = 0x01
19+
cmdBindOK byte = 0x02
20+
cmdDial byte = 0x03
21+
cmdDialOK byte = 0x04
22+
cmdAccept byte = 0x05
23+
cmdSend byte = 0x06
24+
cmdRecv byte = 0x07
25+
cmdClose byte = 0x08
26+
cmdCloseOK byte = 0x09
27+
cmdError byte = 0x0A
28+
cmdSendTo byte = 0x0B
29+
cmdRecvFrom byte = 0x0C
30+
cmdInfo byte = 0x0D
31+
cmdInfoOK byte = 0x0E
32+
cmdHandshake byte = 0x0F
33+
cmdHandshakeOK byte = 0x10
34+
cmdResolveHostname byte = 0x11
35+
cmdResolveHostnameOK byte = 0x12
36+
cmdSetHostname byte = 0x13
37+
cmdSetHostnameOK byte = 0x14
38+
cmdSetVisibility byte = 0x15
39+
cmdSetVisibilityOK byte = 0x16
40+
cmdDeregister byte = 0x17
41+
cmdDeregisterOK byte = 0x18
42+
cmdSetTags byte = 0x19
43+
cmdSetTagsOK byte = 0x1A
4444
cmdSetWebhook byte = 0x1B
4545
cmdSetWebhookOK byte = 0x1C
4646
cmdSetWebhookTopics byte = 0x1D
4747
cmdSetWebhookTopicsOK byte = 0x1E
4848
cmdNetwork byte = 0x1F
49-
cmdNetworkOK byte = 0x20
50-
cmdHealth byte = 0x21
51-
cmdHealthOK byte = 0x22
52-
cmdManaged byte = 0x23
53-
cmdManagedOK byte = 0x24
54-
cmdRotateKey byte = 0x25
55-
cmdRotateKeyOK byte = 0x26
56-
cmdBroadcast byte = 0x29
57-
cmdBroadcastOK byte = 0x2A
49+
cmdNetworkOK byte = 0x20
50+
cmdHealth byte = 0x21
51+
cmdHealthOK byte = 0x22
52+
cmdManaged byte = 0x23
53+
cmdManagedOK byte = 0x24
54+
cmdRotateKey byte = 0x25
55+
cmdRotateKeyOK byte = 0x26
56+
cmdBroadcast byte = 0x29
57+
cmdBroadcastOK byte = 0x2A
5858
)
5959

6060
// Network sub-commands (must match daemon SubNetwork* constants)

0 commit comments

Comments
 (0)