-
Notifications
You must be signed in to change notification settings - Fork 9
WIP: Draft up identity specs for delegation #2013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 issues found across 3 files
Prompt for AI agents (all 3 issues)
Understand the root cause of the following 3 issues and fix them.
<file name="docs/specs/delegation.md">
<violation number="1" location="docs/specs/delegation.md:29">
Replace “responsible from” with “responsible for” so the sentence reads correctly and the responsibility is unambiguous.</violation>
<violation number="2" location="docs/specs/delegation.md:35">
Use the plural verb “are” so the subject-verb agreement is correct and the sentence reads naturally.</violation>
</file>
<file name="packages/identity/src/url.ts">
<violation number="1" location="packages/identity/src/url.ts:28">
The parser drops any path segments beyond the first three address components, so a malformed URL such as "/@ns/space/charm/extra" is treated as valid instead of throwing. Please reject paths that contain additional segments after the charm component.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
| > [!NOTE] | ||
| > There may be a way to view a namespace, like itemizing all contained spaces, but is out of scope here. | ||
|
|
||
| Additionally, delegations for access to the namespace is stored in the admin space as well. See **CAPABILITIES** below for delegation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the plural verb “are” so the subject-verb agreement is correct and the sentence reads naturally.
Prompt for AI agents
Address the following comment on docs/specs/delegation.md at line 35:
<comment>Use the plural verb “are” so the subject-verb agreement is correct and the sentence reads naturally.</comment>
<file context>
@@ -0,0 +1,110 @@
+> [!NOTE]
+> There may be a way to view a namespace, like itemizing all contained spaces, but is out of scope here.
+
+Additionally, delegations for access to the namespace is stored in the admin space as well. See **CAPABILITIES** below for delegation.
+
+### Namespace Admin Space
</file context>
| Additionally, delegations for access to the namespace is stored in the admin space as well. See **CAPABILITIES** below for delegation. | |
| Additionally, delegations for access to the namespace are stored in the admin space as well. See **CAPABILITIES** below for delegation. |
|
|
||
| Namespaces can be referenced via DNS record, resolving to a DID key, or via directly as a DID key. Similarly, a provider-namespace is implied when no namespace given, which also resolves to an identity DID. | ||
|
|
||
| Namespaces manage many spaces, and are responsible from mapping space petnames to their identity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace “responsible from” with “responsible for” so the sentence reads correctly and the responsibility is unambiguous.
Prompt for AI agents
Address the following comment on docs/specs/delegation.md at line 29:
<comment>Replace “responsible from” with “responsible for” so the sentence reads correctly and the responsibility is unambiguous.</comment>
<file context>
@@ -0,0 +1,110 @@
+
+Namespaces can be referenced via DNS record, resolving to a DID key, or via directly as a DID key. Similarly, a provider-namespace is implied when no namespace given, which also resolves to an identity DID.
+
+Namespaces manage many spaces, and are responsible from mapping space petnames to their identity.
+Each namespace has an "admin" space (possibly with the same identity as the namespace itself?), where records are stored.
+
</file context>
| Namespaces manage many spaces, and are responsible from mapping space petnames to their identity. | |
| Namespaces manage many spaces, and are responsible for mapping space petnames to their identity. |
| } | ||
|
|
||
| export function parseCharmAddress(url: URL): CharmAddress { | ||
| const [prefix, ns, space, charm] = url.pathname.split("/"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parser drops any path segments beyond the first three address components, so a malformed URL such as "/@ns/space/charm/extra" is treated as valid instead of throwing. Please reject paths that contain additional segments after the charm component.
Prompt for AI agents
Address the following comment on packages/identity/src/url.ts at line 28:
<comment>The parser drops any path segments beyond the first three address components, so a malformed URL such as "/@ns/space/charm/extra" is treated as valid instead of throwing. Please reject paths that contain additional segments after the charm component.</comment>
<file context>
@@ -0,0 +1,65 @@
+}
+
+export function parseCharmAddress(url: URL): CharmAddress {
+ const [prefix, ns, space, charm] = url.pathname.split("/");
+ if (prefix || !ns) throw new CharmAddressError();
+ if (!space && charm) throw new CharmAddressError();
</file context>
First draft of defining how delegations work for namespaces, spaces, and charms