The licence manager's verb is public-key: a seat's verb is lower-case letters, digits and hyphens
public_key failed the builder's manifest check and stopped the manager's rebuild; claude-code asks the new name.
This commit is contained in:
@@ -374,7 +374,7 @@ func TestAnAPIKeyIsHandedOverSealedAndItsFileRemoved(t *testing.T) {
|
||||
raw, _ := json.Marshal(args)
|
||||
sent = append(sent, address+" "+string(raw))
|
||||
switch address {
|
||||
case "seat:anthropic-licence-manager.public_key":
|
||||
case "seat:anthropic-licence-manager.public-key":
|
||||
return json.Marshal(map[string]any{"public_key": manager.PublicKey})
|
||||
case "seat:anthropic-licence-manager.adopt":
|
||||
box := args.(map[string]any)["sealed"].(SealedBox)
|
||||
|
||||
@@ -356,7 +356,7 @@ func AddAPIKey(p Paths, name, file string, useHere bool, ask Ask) (map[string]an
|
||||
if key == "" {
|
||||
return nil, fmt.Errorf("%s is empty", file)
|
||||
}
|
||||
answer, err := ask(SeatVerb("public_key"), map[string]any{})
|
||||
answer, err := ask(SeatVerb("public-key"), map[string]any{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ func tools() []stdio.Tool {
|
||||
}
|
||||
return m.Store.Usage(ctx, l, limit)
|
||||
}),
|
||||
verb("adopt", "Adopt an API key — never as an argument: from a file on the manager's node (`file`), or sealed to the manager's `public_key` by a node's claude-code (`sealed`; its `claude_code_add_api_key` does this). Subscriptions are adopted from the nodes' logins by themselves.",
|
||||
verb("adopt", "Adopt an API key — never as an argument: from a file on the manager's node (`file`), or sealed to the manager's `public-key` by a node's claude-code (`sealed`; its `claude_code_add_api_key` does this). Subscriptions are adopted from the nodes' logins by themselves.",
|
||||
map[string]any{"name": str("the licence's name"), "file": str("a file on the manager's node holding the key"),
|
||||
"sealed": map[string]any{"type": "object", "description": "the key sealed to the manager's public key"},
|
||||
"from": str("which node it came from, for the audit")},
|
||||
@@ -350,7 +350,7 @@ func tools() []stdio.Tool {
|
||||
}
|
||||
return m.AdoptKey(ctx, n, f)
|
||||
}),
|
||||
verb("public_key", "The manager's public key, PEM: what a node seals an API key or a login to before handing it over.",
|
||||
verb("public-key", "The manager's public key, PEM: what a node seals an API key or a login to before handing it over.",
|
||||
nil, func(_ context.Context, m *Manager, _ map[string]any) (any, error) {
|
||||
return map[string]any{"public_key": m.Keys.PublicKey}, nil
|
||||
}),
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
"usage",
|
||||
"adopt",
|
||||
"current",
|
||||
"public_key"
|
||||
"public-key"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -52,7 +52,7 @@
|
||||
"usage",
|
||||
"adopt",
|
||||
"current",
|
||||
"public_key"
|
||||
"public-key"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user