Skip to content

Commit 5415e61

Browse files
committed
Add in private field to TUI
1 parent 28669dc commit 5415e61

37 files changed

Lines changed: 739 additions & 83 deletions

File tree

.changeset/thirty-facts-say.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@agent-facets/protocol": minor
3+
"agent-facets": minor
4+
---
5+
6+
Add in private facet support

docs/cli/authoring/create.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ If a `facet.json` already exists in the target directory, the command prompts fo
1818
1. **Name** -- the facet identity. Either an unscoped name (`my-facet`) or a scoped name (`@scope/name`, e.g. `@acme/my-facet`). See the [Manifest Schema](/specification/manifest#facet-name-grammar) for the full name grammar.
1919
2. **Description** -- a brief description of the facet.
2020
3. **Version** -- defaults to `0.0.0`.
21-
4. **Assets** -- add skills, agents, and commands by name. Asset names are always plain kebab-case local identifiers (`code-review`) -- they are never scoped, even when the facet identity is. The first asset of each type defaults its name to the facet's unscoped name segment (`@acme/cowsay` suggests `cowsay`). At least one asset is required. Each asset shows its description below the name -- press Enter to edit the name, or press ↓ during name editing to edit the description in your terminal editor.
22-
5. **Confirmation** -- review the summary and confirm.
21+
4. **Privacy** -- choose Public (the default) or Private. Press Space (or ← / →) to toggle, Enter to continue. Public omits the [`private`](/specification/manifest#privacy) field from the generated manifest; Private writes `private: true`. Privacy is manifest content embedded at build time -- changing it later requires a rebuild, and a version bump if the version was already published.
22+
5. **Assets** -- add skills, agents, and commands by name. Asset names are always plain kebab-case local identifiers (`code-review`) -- they are never scoped, even when the facet identity is. The first asset of each type defaults its name to the facet's unscoped name segment (`@acme/cowsay` suggests `cowsay`). At least one asset is required. Each asset shows its description below the name -- press Enter to edit the name, or press ↓ during name editing to edit the description in your terminal editor.
23+
6. **Confirmation** -- review the summary -- including the selected privacy intent and a reminder that privacy takes effect after a rebuild -- and confirm.
2324

2425
## Generated files
2526

docs/cli/authoring/edit.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@ All reconciliation items must be resolved before proceeding to editing.
3131
After reconciliation (or immediately if no drift), the edit phase allows:
3232

3333
- **Identity editing** -- modify the facet name, description, and version
34+
- **Privacy editing** -- inspect the facet's current visibility intent without opening `facet.json`, and switch between Public and Private. Press Space (or ← / →) to toggle, Enter to continue. Setting Private writes `private: true`; switching a private facet to Public omits `private`. If the source manifest had an explicit `private: false` and you leave the facet public, that explicit `false` is preserved rather than silently rewritten.
3435
- **Asset management** -- add, remove, or rename skills, agents, and commands
3536
- **Description editing** -- press Enter on an asset to edit its name, or press ↓ during name editing to open the description in your terminal editor (`$VISUAL` / `$EDITOR` / `vi`)
3637

3738
All changes are transactional -- nothing is written to disk until you review and confirm on the confirmation page. Exit at any point with Esc Esc to discard all changes.
3839

3940
## Confirmation
4041

41-
Before applying, a summary shows the final state of your facet -- identity fields and all assets with their descriptions. Choose "Apply" to write changes or "Go back" to continue editing.
42+
Before applying, a summary shows the final state of your facet -- identity fields, the privacy intent, and all assets with their descriptions -- along with a reminder that a privacy change is embedded at build time (rebuild to apply it, and bump the version if it was already published). Choose "Apply" to write changes or "Go back" to continue editing.
4243

4344
On apply, the edit command:
4445
- Writes the updated `facet.json`

docs/guides/create-your-first-facet.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ By the end of this guide you will have a working `.facet` file ready to publish
1515
facet create my-facet
1616
```
1717

18-
The [`facet create`](/cli/authoring/create) wizard walks you through four prompts:
18+
The [`facet create`](/cli/authoring/create) wizard walks you through five prompts:
1919

2020
1. **Name** -- the facet identity: an unscoped name (`my-facet`) or a scoped name (`@scope/name`, e.g. `@acme/my-facet`). Each segment is kebab-case.
2121
2. **Description** -- a brief summary of what the facet does.
2222
3. **Version** -- defaults to `0.0.0`.
23-
4. **Assets** -- add skills, agents, and commands by name. Asset names are always plain kebab-case -- never scoped, even when the facet identity is. At least one asset is required.
23+
4. **Privacy** -- Public (default) or Private. Public omits [`private`](/specification/manifest#privacy) from the manifest; Private writes `private: true`.
24+
5. **Assets** -- add skills, agents, and commands by name. Asset names are always plain kebab-case -- never scoped, even when the facet identity is. At least one asset is required.
2425

2526
After confirming, the wizard writes the project files.
2627
</Step>

docs/guides/publish-a-facet.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,16 @@ If you forget to rebuild after bumping the version, publish detects the identity
113113

114114
### Making a published facet private (or public)
115115

116-
The [`private`](/specification/manifest#privacy) flag is manifest content, so changing it is a content change like any other. A version that is already published is immutable: you cannot flip `private` on an existing `(name, version)`. To change visibility, bump the `version`, rebuild, and republish:
116+
The [`private`](/specification/manifest#privacy) flag is manifest content, so changing it is a content change like any other. A version that is already published is immutable: you cannot flip `private` on an existing `(name, version)`. To change visibility, set the privacy intent, bump the `version`, rebuild, and republish:
117117

118118
```sh
119-
# edit facet.json: set "private": true (or remove it / set false to go public)
119+
facet edit # toggle Privacy between Public and Private (no hand-editing JSON)
120+
# edit facet.json: bump "version"
120121
facet build
121122
facet publish
122123
```
123124

124-
Omitting `private` (or setting it to `false`) keeps the facet public; `true` declares private publish intent. Registry-side enforcement of who can see or download a private facet is handled by the registry, not the CLI.
125+
Use [`facet edit`](/cli/authoring/edit) to change visibility interactively -- it shows the current privacy intent and writes the manifest for you. (You can still hand-edit `facet.json` if you prefer.) Omitting `private` (or setting it to `false`) keeps the facet public; `true` declares private publish intent. Registry-side enforcement of who can see or download a private facet is handled by the registry, not the CLI.
125126

126127
## Sign out
127128

lefthook.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pre-commit:
1414
- "sst-env.d.ts"
1515
- "**/sst-env.d.ts"
1616
- "**/generated/**"
17+
- "openspec/changes/archive/**"
1718
run: bun biome check --write --unsafe {staged_files}
1819
stage_fixed: true
1920
biome-lint:
@@ -23,6 +24,7 @@ pre-commit:
2324
- "sst-env.d.ts"
2425
- "**/sst-env.d.ts"
2526
- "**/generated/**"
27+
- "openspec/changes/archive/**"
2628
run: bun biome check --error-on-warnings {staged_files}
2729
circleci-pack:
2830
priority: 4

openspec/changes/expose-facet-privacy-toggle/.openspec.yaml renamed to openspec/changes/archive/2026-06-17-expose-facet-privacy-toggle/.openspec.yaml

File renamed without changes.

openspec/changes/expose-facet-privacy-toggle/adversarial/artifacts/design.md renamed to openspec/changes/archive/2026-06-17-expose-facet-privacy-toggle/adversarial/artifacts/design.md

File renamed without changes.

openspec/changes/expose-facet-privacy-toggle/adversarial/artifacts/proposal.md renamed to openspec/changes/archive/2026-06-17-expose-facet-privacy-toggle/adversarial/artifacts/proposal.md

File renamed without changes.

openspec/changes/expose-facet-privacy-toggle/adversarial/artifacts/specs/authoring__facets/spec.md renamed to openspec/changes/archive/2026-06-17-expose-facet-privacy-toggle/adversarial/artifacts/specs/authoring__facets/spec.md

File renamed without changes.

0 commit comments

Comments
 (0)