You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(persona-kit): tags optional + free-form per cloud#553 schema (#114)
* fix(persona-kit): make tags optional + free-form per cloud#553 schema
parseTags rejected free-form strings (only accepted intent-enum values) AND
required the field to be present + non-empty. Both are wrong per the schema
in cloud#553 (`tags text[]` — denorm metadata, not a closed enum).
This broke the canonical reference persona (examples/notion-essay-pr) whose
tags are ['proactive', 'notion', 'github'] — none of which are in the intent
enum. First customer (proactive-agents) hit it deploying today.
- parseTags returns undefined when tags is missing/null/empty
- accepts any string[] with 1..64-char entries, deduped+sorted
- removes the closed-enum constraint
- widens PersonaSpec.tags to readonly string[] (optional)
- regenerates persona.schema.json with the new shape
(tags items: { type: string, minLength: 1, maxLength: 64 }; tags
dropped from `required`; PersonaTag enum definition removed)
- emit-schema.mjs gains a post-process for tags-items bounds matching
the existing tightenWorkspaceServiceAccountName pattern
- cli list/show + local-personas accept any string tag; --filter-tag is
free-form with built-in tags surfaced as a hint
- tests cover all the optional/free-form/validation paths
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix(cli): normalize free-form persona tags
* test(deploy): satisfy persona fixture typing
* test(deploy): fix cloud deployUrl fixture typing
* test(deploy): widen cloud fixture override type
* fix(deploy/cli): satisfy strict typing on cloud test fixture; harden parseOverride null path
- packages/deploy/src/modes/cloud.test.ts: route the PersonaSpec<->{cloud:{deployUrl}} casts through `unknown` at the construct site and at all three deployedUrl(...) call sites so TS no longer rejects the bidirectional conversion (CI typecheck blocker).
- packages/cli/src/local-personas.ts: omit `tags` from the parseOverride return object when no tags were provided, instead of returning `tags: undefined`. Combined with the existing `raw.tags === null` guard, this guarantees `LocalPersonaOverride.tags` is either a trimmed/deduped/sorted PersonaTag[] or absent — never null at runtime, never an empty array, never an explicit-undefined key. Addresses Devin BUG_0002.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Ricky Schema Cascade <ricky@agent-relay.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Miya <khaliqgant+miya@gmail.com>
Copy file name to clipboardExpand all lines: packages/persona-kit/schemas/persona.schema.json
+4-17Lines changed: 4 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,11 @@
14
14
"tags": {
15
15
"type": "array",
16
16
"items": {
17
-
"$ref": "#/definitions/PersonaTag"
17
+
"type": "string",
18
+
"minLength": 1,
19
+
"maxLength": 64
18
20
},
19
-
"description": "Free-form classification labels (from {@link PERSONA_TAGS } ). Every persona has at least one; a persona may carry multiple tags when it spans concerns (e.g. `['testing', 'implementation']`)."
21
+
"description": "Free-form catalog labels mirroring `tags text[]` in cloud#553. Tags are denormalized metadata for catalog filtering — they are NOT a closed enum and do NOT overlap with {@link intent } . Authors are free to label personas with provider names, project codes, or workflow shapes (e.g. `['proactive', 'notion', 'github']`). Optional; omitted, `null`, and empty-array values are treated identically."
0 commit comments