@aexol/opencode-wizard 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +6 -4
  2. package/dist/graphql-operations.d.ts +1 -0
  3. package/dist/graphql-operations.js +12 -0
  4. package/dist/graphql-operations.js.map +1 -1
  5. package/dist/plugin-tools.d.ts +11 -0
  6. package/dist/plugin-tools.js +16 -1
  7. package/dist/plugin-tools.js.map +1 -1
  8. package/dist/server/import-sources.d.ts +27 -0
  9. package/dist/server/import-sources.js +115 -0
  10. package/dist/server/import-sources.js.map +1 -0
  11. package/dist/server/runtime.js +121 -1
  12. package/dist/server/runtime.js.map +1 -1
  13. package/dist/server/types.d.ts +12 -0
  14. package/dist/server/types.js.map +1 -1
  15. package/dist/server.d.ts +1 -0
  16. package/dist/server.js +1 -0
  17. package/dist/server.js.map +1 -1
  18. package/dist/tui/components/common.d.ts +0 -1
  19. package/dist/tui/components/common.js +6 -29
  20. package/dist/tui/components/common.js.map +1 -1
  21. package/dist/tui/components/status-content.js +1 -1
  22. package/dist/tui/components/status-content.js.map +1 -1
  23. package/dist/tui/constants.d.ts +0 -5
  24. package/dist/tui/constants.js +0 -5
  25. package/dist/tui/constants.js.map +1 -1
  26. package/dist/tui/formatting.d.ts +0 -3
  27. package/dist/tui/formatting.js +1 -13
  28. package/dist/tui/formatting.js.map +1 -1
  29. package/dist/tui/skill-helpers.d.ts +1 -11
  30. package/dist/tui/skill-helpers.js +0 -42
  31. package/dist/tui/skill-helpers.js.map +1 -1
  32. package/dist/tui/slots.d.ts +1 -1
  33. package/dist/tui/slots.js +1 -24
  34. package/dist/tui/slots.js.map +1 -1
  35. package/dist/tui/status.js +2 -2
  36. package/dist/tui/status.js.map +1 -1
  37. package/dist/tui/types.d.ts +0 -19
  38. package/dist/tui/types.js.map +1 -1
  39. package/package.json +1 -1
  40. package/dist/tui/components/preference-action-notice-row.d.ts +0 -5
  41. package/dist/tui/components/preference-action-notice-row.js +0 -17
  42. package/dist/tui/components/preference-action-notice-row.js.map +0 -1
  43. package/dist/tui/components/skill-catalog-row.d.ts +0 -8
  44. package/dist/tui/components/skill-catalog-row.js +0 -125
  45. package/dist/tui/components/skill-catalog-row.js.map +0 -1
  46. package/dist/tui/components/wizard-skills-dialog-content.d.ts +0 -9
  47. package/dist/tui/components/wizard-skills-dialog-content.js +0 -229
  48. package/dist/tui/components/wizard-skills-dialog-content.js.map +0 -1
  49. package/dist/tui/components/wizard-skills-dialog.d.ts +0 -7
  50. package/dist/tui/components/wizard-skills-dialog.js +0 -156
  51. package/dist/tui/components/wizard-skills-dialog.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../src/server/types.ts"],"sourcesContent":["import type { ToolFactory } from '../plugin-tools.js';\nimport type { PublishedSkillDetail, PublishedSkillSummary, PublishedSkillsSuccessState } from '../published-skills-transform.js';\nimport type { NativeSkillsUrlCompatibility } from './constants.js';\n\nexport type ResolvedConfig = {\n backendOrigin: string;\n graphqlUrl: string;\n authSessionUrl: string;\n presenceUrl: string;\n actionsUrl: string;\n configuredWorkspaceSlug: string | null;\n fallbackWorkspaceSlug: string;\n rootSkillSeedPath: string;\n authStatePath: string;\n};\n\nexport type WorkspaceResolution = {\n requestedDirectory: string;\n repositoryRoot: string;\n repositoryUrl: string | null;\n workspaceSlug?: string | null;\n workspaceSlugSource?: 'configured' | 'learned' | 'backend' | 'fallback' | 'repositoryUrl' | 'placeholder';\n fallbackWorkspaceSlug: string | null;\n directoryPath: string;\n cacheKey: string;\n};\n\nexport type WorkspaceResolutionOutput = {\n requestedDirectory: string;\n repositoryRoot: string;\n repositoryUrl: string | null;\n workspaceSlug?: string | null;\n workspaceSlugSource?: WorkspaceResolution['workspaceSlugSource'];\n fallbackWorkspaceSlug: string | null;\n directoryPath: string;\n};\n\nexport type StoredWorkspaceSlugMapping = {\n repositoryUrl: string | null;\n repositoryRoot: string | null;\n workspaceSlug: string;\n updatedAt: string;\n};\n\nexport type PublishedSkillCatalogResponse = {\n pluginPublishedSkills: PublishedSkillCatalogPayload;\n};\n\nexport type PublishedSkillDetailResponse = {\n pluginPublishedSkillVersionArtifact: PublishedSkillArtifactDetailPayload | null;\n};\n\nexport type WizardArtifactKind = 'SKILL' | 'DESIGN_DOC';\n\nexport type WizardArtifactCatalogResponse = {\n pluginWizardArtifacts: WizardArtifactCatalogPayload;\n};\n\nexport type WizardArtifactDetailResponse = {\n pluginWizardArtifactVersion: WizardArtifactDetailPayload | null;\n};\n\nexport type PublishedSkillCatalogPayload = {\n workspace: {\n id: string;\n slug: string;\n name: string;\n repositoryUrl?: string | null;\n defaultBranch?: string | null;\n status: string;\n } | null;\n directoryPath: string;\n skills: PublishedSkillCatalogItem[];\n catalogSkills: PublishedSkillInstallableCatalogItem[];\n userPreferences: PublishedSkillUserPreferences;\n};\n\nexport type WizardArtifactCatalogPayload = {\n artifactKind: WizardArtifactKind;\n workspace: PublishedSkillCatalogPayload['workspace'];\n directoryPath: string;\n artifacts: WizardArtifactCatalogItem[];\n catalogArtifacts: WizardArtifactInstallableCatalogItem[];\n artifactPreferences: WizardArtifactUserPreferences;\n unsupportedReason?: string | null;\n message?: string | null;\n};\n\nexport type WizardArtifactUserPreferences = {\n scopeKey: string;\n userKey: string;\n ignoredArtifacts: WizardArtifactCatalogItem[];\n};\n\nexport type PublishedSkillUserPreferences = {\n scopeKey: string;\n userKey: string;\n ignoredSkills: PublishedSkillCatalogItem[];\n};\n\nexport type PublishedSkillPreferenceScope = 'GLOBAL' | 'WORKSPACE';\n\nexport type CreateOrUpdateSkillFromMarkdownResponse = {\n createOrUpdateSkillFromMarkdown: {\n success: boolean;\n skillSlug: string;\n skillVersionId: string | null;\n errors: string[];\n };\n};\n\nexport type SetPublishedSkillPreferenceResponse = {\n setPublishedSkillPreference: PublishedSkillUserPreferences;\n};\n\nexport type PublishedSkillInstallableCatalogItem = Pick<\n PublishedSkillCatalogItem,\n 'skill' | 'skillVersion' | 'publishedArtifact'\n>;\n\nexport type PublishedSkillCatalogItem = {\n assignmentSource: string;\n assignmentType: string;\n scopePath: string;\n includeChildren?: boolean | null;\n skill: {\n id: string;\n slug: string;\n name: string;\n summary?: string | null;\n whenToUse?: string | null;\n status: string;\n installPolicy: PublishedSkillInstallPolicy;\n tags: PublishedSkillTag[];\n };\n skillVersion: {\n id: string;\n version: string;\n title?: string | null;\n summary?: string | null;\n status: string;\n };\n publishedArtifact: {\n id: string;\n frontmatterName: string;\n frontmatterDescription: string;\n checksum: string;\n publishedAt: string;\n fileCount: number;\n };\n};\n\nexport type WizardArtifactInstallableCatalogItem = Pick<\n WizardArtifactCatalogItem,\n 'artifact' | 'artifactVersion'\n>;\n\nexport type WizardArtifactCatalogItem = {\n assignmentSource: string;\n assignmentType: string;\n scopePath: string;\n includeChildren?: boolean | null;\n artifact: {\n id: string;\n kind: WizardArtifactKind;\n slug: string;\n name: string;\n summary?: string | null;\n whenToUse?: string | null;\n status: string;\n installPolicy: PublishedSkillInstallPolicy;\n };\n artifactVersion: {\n id: string;\n version: string;\n title?: string | null;\n summary?: string | null;\n status: string;\n frontmatterName: string;\n frontmatterDescription: string;\n checksum: string;\n canonicalFilePath: string;\n publishedAt: string;\n fileCount: number;\n };\n};\n\nexport type PublishedSkillArtifactFilePayload = {\n id: string;\n relativePath: string;\n contentType: string;\n content: string;\n checksum: string;\n size: number;\n sortOrder: number;\n};\n\nexport type PublishedSkillFacet = {\n id: string;\n slug: string;\n label: string;\n description?: string | null;\n};\n\nexport type PublishedSkillTag = {\n id: string;\n slug: string;\n label: string;\n description?: string | null;\n facet?: PublishedSkillFacet | null;\n};\n\nexport type PublishedSkillInstallPolicy = 'GLOBAL_CONTEXT' | 'PROJECT_INSTALLABLE';\n\nexport type PublishedSkillDetailItem = PublishedSkillCatalogItem & {\n publishedArtifact: PublishedSkillCatalogItem['publishedArtifact'] & {\n markdownBody: string;\n renderedContent: string;\n files: PublishedSkillArtifactFilePayload[];\n };\n};\n\nexport type WizardArtifactDetailItem = WizardArtifactCatalogItem & {\n artifactVersion: WizardArtifactCatalogItem['artifactVersion'] & {\n markdownBody: string;\n renderedContent: string;\n files: PublishedSkillArtifactFilePayload[];\n };\n};\n\nexport type PublishedSkillArtifactDetailPayload = PublishedSkillCatalogItem['publishedArtifact'] & {\n markdownBody: string;\n renderedContent: string;\n files: PublishedSkillArtifactFilePayload[];\n};\n\nexport type WizardArtifactDetailPayload = WizardArtifactCatalogItem['artifactVersion'] & {\n artifact: WizardArtifactCatalogItem['artifact'];\n markdownBody: string;\n renderedContent: string;\n files: PublishedSkillArtifactFilePayload[];\n};\n\nexport type PublishedSkillArtifactDetailPurpose = 'TOOL_FETCH';\n\nexport type GraphQLErrorItem = {\n message: string;\n};\n\nexport type GraphQLResponse<TData> = {\n data?: TData;\n errors?: GraphQLErrorItem[];\n};\n\nexport type AuthState = {\n pluginId: string;\n sessionToken: string;\n expiresAt: string;\n authenticatedAt: string;\n userId: string;\n email: string;\n role?: 'ADMIN' | 'EDITOR' | null;\n};\n\nexport type PresenceEventType = 'START' | 'STOP';\n\nexport type PluginActionEventType =\n | PresenceEventType\n | 'FETCH_SUCCESS'\n | 'FETCH_FAILED'\n | 'LOGIN_SUCCESS'\n | 'LOGIN_FAILED'\n | 'PREFERENCE_SUCCESS'\n | 'PREFERENCE_FAILED';\n\nexport type LoginBootstrapTrigger = 'fetch' | 'status';\n\nexport type LoginBootstrapSnapshot = {\n status: 'idle' | 'starting' | 'pending' | 'authenticated' | 'failed';\n trigger: LoginBootstrapTrigger | null;\n startedAt: string | null;\n expiresAt: string | null;\n browserUrl: string | null;\n browserOpenError: string | null;\n email: string | null;\n message: string | null;\n};\n\nexport type StatusPathLoginBootstrap = {\n promise: Promise<AuthState> | null;\n status: 'idle' | 'pending' | 'authenticated' | 'failed';\n message: string | null;\n failedAt: number | null;\n};\n\nexport type FetchResult =\n | {\n ok: true;\n status: 'ready';\n authMode: 'session';\n payload: PublishedSkillCatalogPayload;\n fetchedAt: string;\n source: 'network' | 'cache';\n }\n | {\n ok: false;\n status: 'missing_auth' | 'request_failed';\n authMode: 'missing' | 'session';\n message: string;\n fetchedAt: string;\n source: 'network' | 'cache';\n };\n\nexport type CacheEntry = {\n result: FetchResult;\n expiresAt: number;\n};\n\nexport type WizardArtifactFetchResult =\n | {\n ok: true;\n status: 'ready';\n authMode: 'session';\n payload: WizardArtifactCatalogPayload;\n fetchedAt: string;\n source: 'network' | 'cache';\n }\n | Extract<FetchResult, { ok: false }>;\n\nexport type DetailCacheEntry = {\n artifact: PublishedSkillArtifactDetailPayload;\n expiresAt: number;\n};\n\nexport type PublishedSkillPreferenceAction = 'install' | 'uninstall' | 'ignore' | 'unignore';\n\nexport type OpencodePluginModule = {\n tool: ToolFactory;\n};\n\nexport type OpencodePluginServerInput = {\n worktree: string;\n directory: string;\n};\n\nexport type OpencodePluginSystemTransformOutput = {\n system: string[];\n};\n\nexport type OpencodePluginServer = (input: OpencodePluginServerInput) => Promise<{\n tool: Record<string, unknown>;\n 'experimental.chat.system.transform': (\n hookInput: unknown,\n output: OpencodePluginSystemTransformOutput,\n ) => Promise<void>;\n}>;\n\nexport type PublishedSkillsResult = {\n directoryPath: string;\n workspaceResolution: WorkspaceResolution;\n fetchResult: FetchResult;\n};\n\nexport type PublishedSkillsIgnoreState = {\n scopeKey: string;\n userKey: string;\n ignoredSkillSlugs: string[];\n installedGlobalSkillSlugs: string[];\n installedWorkspaceSkillSlugs: string[];\n};\n\nexport type PublishedSkillPreferenceCacheContext = {\n userKey: string;\n preferenceVersion: number;\n};\n\nexport type FilteredPublishedSkillsResult = PublishedSkillsResult & {\n ignoreState: PublishedSkillsIgnoreState;\n ignoredSkills: PublishedSkillSummary[];\n};\n\nexport type PublishedSkillDetailResult =\n | {\n ok: true;\n detail: PublishedSkillDetail;\n }\n | {\n ok: false;\n status: 'not_found' | 'missing_auth' | 'request_failed';\n output: string;\n metadata: Record<string, string>;\n };\n\nexport type PluginAuthStateSummary = {\n status: 'missing' | 'authenticated';\n email: string | null;\n userId: string | null;\n role: 'ADMIN' | 'EDITOR' | null;\n authenticatedAt: string | null;\n expiresAt: string | null;\n};\n\nexport type PluginStatusSnapshot = {\n pluginId: string;\n runtimeMode: 'tool_fetch_only';\n nativeSkillsUrlCompatibility: NativeSkillsUrlCompatibility;\n backendOrigin: string;\n graphqlUrl: string;\n fallbackWorkspaceSlug: string;\n workspaceResolution: WorkspaceResolutionOutput;\n rootSkillSeedPath: string;\n authStatePath: string;\n authState: PluginAuthStateSummary;\n status: FetchResult['status'];\n authMode: FetchResult['authMode'];\n fetchedAt: string;\n source: FetchResult['source'];\n availableTools: string[];\n message: string | null;\n catalog: PublishedSkillsSuccessState | null;\n installableCatalog: {\n count: number;\n skills: PublishedSkillSummary[];\n } | null;\n ignoredPublishedSkills: {\n scopeKey: string;\n userKey: string;\n count: number;\n skills: PublishedSkillSummary[];\n };\n};\n\nexport type AiFacingIgnoredPublishedSkillsSummary = {\n scopeKey: string;\n count: number;\n};\n\nexport type AiFacingPluginStatusSnapshot = Omit<PluginStatusSnapshot, 'ignoredPublishedSkills' | 'installableCatalog'> & {\n ignoredPublishedSkills: AiFacingIgnoredPublishedSkillsSummary;\n};\n\nexport type OidcDiscoveryDocument = {\n authorization_endpoint: string;\n};\n\nexport type PluginSessionResponse = {\n success: true;\n session: {\n jwtToken: string;\n expiresAt: string;\n user: {\n id: string;\n email: string;\n role?: 'ADMIN' | 'EDITOR';\n };\n };\n};\n\nexport type OidcCallbackPayload =\n | {\n status: 'success';\n code: string;\n state: string;\n }\n | {\n status: 'error';\n message: string;\n };\n\nexport type OidcLoginStart = {\n browserUrl: string;\n expiresAt: string;\n codeVerifier: string;\n expectedState: string;\n callbackPromise: Promise<OidcCallbackPayload>;\n closeCallbackServer: () => Promise<void>;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../src/server/types.ts"],"sourcesContent":["import type { ToolFactory } from '../plugin-tools.js';\nimport type { PublishedSkillDetail, PublishedSkillSummary, PublishedSkillsSuccessState } from '../published-skills-transform.js';\nimport type { NativeSkillsUrlCompatibility } from './constants.js';\n\nexport type ResolvedConfig = {\n backendOrigin: string;\n graphqlUrl: string;\n authSessionUrl: string;\n presenceUrl: string;\n actionsUrl: string;\n configuredWorkspaceSlug: string | null;\n fallbackWorkspaceSlug: string;\n rootSkillSeedPath: string;\n authStatePath: string;\n};\n\nexport type WorkspaceResolution = {\n requestedDirectory: string;\n repositoryRoot: string;\n repositoryUrl: string | null;\n workspaceSlug?: string | null;\n workspaceSlugSource?: 'configured' | 'learned' | 'backend' | 'fallback' | 'repositoryUrl' | 'placeholder';\n fallbackWorkspaceSlug: string | null;\n directoryPath: string;\n cacheKey: string;\n};\n\nexport type WorkspaceResolutionOutput = {\n requestedDirectory: string;\n repositoryRoot: string;\n repositoryUrl: string | null;\n workspaceSlug?: string | null;\n workspaceSlugSource?: WorkspaceResolution['workspaceSlugSource'];\n fallbackWorkspaceSlug: string | null;\n directoryPath: string;\n};\n\nexport type StoredWorkspaceSlugMapping = {\n repositoryUrl: string | null;\n repositoryRoot: string | null;\n workspaceSlug: string;\n updatedAt: string;\n};\n\nexport type PublishedSkillCatalogResponse = {\n pluginPublishedSkills: PublishedSkillCatalogPayload;\n};\n\nexport type PublishedSkillDetailResponse = {\n pluginPublishedSkillVersionArtifact: PublishedSkillArtifactDetailPayload | null;\n};\n\nexport type WizardArtifactKind = 'SKILL' | 'DESIGN_DOC';\n\nexport type WizardArtifactCatalogResponse = {\n pluginWizardArtifacts: WizardArtifactCatalogPayload;\n};\n\nexport type WizardArtifactDetailResponse = {\n pluginWizardArtifactVersion: WizardArtifactDetailPayload | null;\n};\n\nexport type PublishedSkillCatalogPayload = {\n workspace: {\n id: string;\n slug: string;\n name: string;\n repositoryUrl?: string | null;\n defaultBranch?: string | null;\n status: string;\n } | null;\n directoryPath: string;\n skills: PublishedSkillCatalogItem[];\n catalogSkills: PublishedSkillInstallableCatalogItem[];\n userPreferences: PublishedSkillUserPreferences;\n};\n\nexport type WizardArtifactCatalogPayload = {\n artifactKind: WizardArtifactKind;\n workspace: PublishedSkillCatalogPayload['workspace'];\n directoryPath: string;\n artifacts: WizardArtifactCatalogItem[];\n catalogArtifacts: WizardArtifactInstallableCatalogItem[];\n artifactPreferences: WizardArtifactUserPreferences;\n unsupportedReason?: string | null;\n message?: string | null;\n};\n\nexport type WizardArtifactUserPreferences = {\n scopeKey: string;\n userKey: string;\n ignoredArtifacts: WizardArtifactCatalogItem[];\n};\n\nexport type PublishedSkillUserPreferences = {\n scopeKey: string;\n userKey: string;\n ignoredSkills: PublishedSkillCatalogItem[];\n};\n\nexport type PublishedSkillPreferenceScope = 'GLOBAL' | 'WORKSPACE';\n\nexport type CreateOrUpdateSkillFromMarkdownResponse = {\n createOrUpdateSkillFromMarkdown: {\n success: boolean;\n skillSlug: string;\n skillVersionId: string | null;\n artifactSlug: string | null;\n artifactVersionId: string | null;\n errors: string[];\n };\n};\n\nexport type ImportWizardArtifactSnapshotResponse = {\n importWizardArtifactSnapshot: {\n success: boolean;\n skillSlug: string | null;\n skillVersionId: string | null;\n artifactSlug: string | null;\n artifactVersionId: string | null;\n errors: string[];\n };\n};\n\nexport type SetPublishedSkillPreferenceResponse = {\n setPublishedSkillPreference: PublishedSkillUserPreferences;\n};\n\nexport type PublishedSkillInstallableCatalogItem = Pick<\n PublishedSkillCatalogItem,\n 'skill' | 'skillVersion' | 'publishedArtifact'\n>;\n\nexport type PublishedSkillCatalogItem = {\n assignmentSource: string;\n assignmentType: string;\n scopePath: string;\n includeChildren?: boolean | null;\n skill: {\n id: string;\n slug: string;\n name: string;\n summary?: string | null;\n whenToUse?: string | null;\n status: string;\n installPolicy: PublishedSkillInstallPolicy;\n tags: PublishedSkillTag[];\n };\n skillVersion: {\n id: string;\n version: string;\n title?: string | null;\n summary?: string | null;\n status: string;\n };\n publishedArtifact: {\n id: string;\n frontmatterName: string;\n frontmatterDescription: string;\n checksum: string;\n publishedAt: string;\n fileCount: number;\n };\n};\n\nexport type WizardArtifactInstallableCatalogItem = Pick<\n WizardArtifactCatalogItem,\n 'artifact' | 'artifactVersion'\n>;\n\nexport type WizardArtifactCatalogItem = {\n assignmentSource: string;\n assignmentType: string;\n scopePath: string;\n includeChildren?: boolean | null;\n artifact: {\n id: string;\n kind: WizardArtifactKind;\n slug: string;\n name: string;\n summary?: string | null;\n whenToUse?: string | null;\n status: string;\n installPolicy: PublishedSkillInstallPolicy;\n };\n artifactVersion: {\n id: string;\n version: string;\n title?: string | null;\n summary?: string | null;\n status: string;\n frontmatterName: string;\n frontmatterDescription: string;\n checksum: string;\n canonicalFilePath: string;\n publishedAt: string;\n fileCount: number;\n };\n};\n\nexport type PublishedSkillArtifactFilePayload = {\n id: string;\n relativePath: string;\n contentType: string;\n content: string;\n checksum: string;\n size: number;\n sortOrder: number;\n};\n\nexport type PublishedSkillFacet = {\n id: string;\n slug: string;\n label: string;\n description?: string | null;\n};\n\nexport type PublishedSkillTag = {\n id: string;\n slug: string;\n label: string;\n description?: string | null;\n facet?: PublishedSkillFacet | null;\n};\n\nexport type PublishedSkillInstallPolicy = 'GLOBAL_CONTEXT' | 'PROJECT_INSTALLABLE';\n\nexport type PublishedSkillDetailItem = PublishedSkillCatalogItem & {\n publishedArtifact: PublishedSkillCatalogItem['publishedArtifact'] & {\n markdownBody: string;\n renderedContent: string;\n files: PublishedSkillArtifactFilePayload[];\n };\n};\n\nexport type WizardArtifactDetailItem = WizardArtifactCatalogItem & {\n artifactVersion: WizardArtifactCatalogItem['artifactVersion'] & {\n markdownBody: string;\n renderedContent: string;\n files: PublishedSkillArtifactFilePayload[];\n };\n};\n\nexport type PublishedSkillArtifactDetailPayload = PublishedSkillCatalogItem['publishedArtifact'] & {\n markdownBody: string;\n renderedContent: string;\n files: PublishedSkillArtifactFilePayload[];\n};\n\nexport type WizardArtifactDetailPayload = WizardArtifactCatalogItem['artifactVersion'] & {\n artifact: WizardArtifactCatalogItem['artifact'];\n markdownBody: string;\n renderedContent: string;\n files: PublishedSkillArtifactFilePayload[];\n};\n\nexport type PublishedSkillArtifactDetailPurpose = 'TOOL_FETCH';\n\nexport type GraphQLErrorItem = {\n message: string;\n};\n\nexport type GraphQLResponse<TData> = {\n data?: TData;\n errors?: GraphQLErrorItem[];\n};\n\nexport type AuthState = {\n pluginId: string;\n sessionToken: string;\n expiresAt: string;\n authenticatedAt: string;\n userId: string;\n email: string;\n role?: 'ADMIN' | 'EDITOR' | null;\n};\n\nexport type PresenceEventType = 'START' | 'STOP';\n\nexport type PluginActionEventType =\n | PresenceEventType\n | 'FETCH_SUCCESS'\n | 'FETCH_FAILED'\n | 'LOGIN_SUCCESS'\n | 'LOGIN_FAILED'\n | 'PREFERENCE_SUCCESS'\n | 'PREFERENCE_FAILED';\n\nexport type LoginBootstrapTrigger = 'fetch' | 'status';\n\nexport type LoginBootstrapSnapshot = {\n status: 'idle' | 'starting' | 'pending' | 'authenticated' | 'failed';\n trigger: LoginBootstrapTrigger | null;\n startedAt: string | null;\n expiresAt: string | null;\n browserUrl: string | null;\n browserOpenError: string | null;\n email: string | null;\n message: string | null;\n};\n\nexport type StatusPathLoginBootstrap = {\n promise: Promise<AuthState> | null;\n status: 'idle' | 'pending' | 'authenticated' | 'failed';\n message: string | null;\n failedAt: number | null;\n};\n\nexport type FetchResult =\n | {\n ok: true;\n status: 'ready';\n authMode: 'session';\n payload: PublishedSkillCatalogPayload;\n fetchedAt: string;\n source: 'network' | 'cache';\n }\n | {\n ok: false;\n status: 'missing_auth' | 'request_failed';\n authMode: 'missing' | 'session';\n message: string;\n fetchedAt: string;\n source: 'network' | 'cache';\n };\n\nexport type CacheEntry = {\n result: FetchResult;\n expiresAt: number;\n};\n\nexport type WizardArtifactFetchResult =\n | {\n ok: true;\n status: 'ready';\n authMode: 'session';\n payload: WizardArtifactCatalogPayload;\n fetchedAt: string;\n source: 'network' | 'cache';\n }\n | Extract<FetchResult, { ok: false }>;\n\nexport type DetailCacheEntry = {\n artifact: PublishedSkillArtifactDetailPayload;\n expiresAt: number;\n};\n\nexport type PublishedSkillPreferenceAction = 'install' | 'uninstall' | 'ignore' | 'unignore';\n\nexport type OpencodePluginModule = {\n tool: ToolFactory;\n};\n\nexport type OpencodePluginServerInput = {\n worktree: string;\n directory: string;\n};\n\nexport type OpencodePluginSystemTransformOutput = {\n system: string[];\n};\n\nexport type OpencodePluginServer = (input: OpencodePluginServerInput) => Promise<{\n tool: Record<string, unknown>;\n 'experimental.chat.system.transform': (\n hookInput: unknown,\n output: OpencodePluginSystemTransformOutput,\n ) => Promise<void>;\n}>;\n\nexport type PublishedSkillsResult = {\n directoryPath: string;\n workspaceResolution: WorkspaceResolution;\n fetchResult: FetchResult;\n};\n\nexport type PublishedSkillsIgnoreState = {\n scopeKey: string;\n userKey: string;\n ignoredSkillSlugs: string[];\n installedGlobalSkillSlugs: string[];\n installedWorkspaceSkillSlugs: string[];\n};\n\nexport type PublishedSkillPreferenceCacheContext = {\n userKey: string;\n preferenceVersion: number;\n};\n\nexport type FilteredPublishedSkillsResult = PublishedSkillsResult & {\n ignoreState: PublishedSkillsIgnoreState;\n ignoredSkills: PublishedSkillSummary[];\n};\n\nexport type PublishedSkillDetailResult =\n | {\n ok: true;\n detail: PublishedSkillDetail;\n }\n | {\n ok: false;\n status: 'not_found' | 'missing_auth' | 'request_failed';\n output: string;\n metadata: Record<string, string>;\n };\n\nexport type PluginAuthStateSummary = {\n status: 'missing' | 'authenticated';\n email: string | null;\n userId: string | null;\n role: 'ADMIN' | 'EDITOR' | null;\n authenticatedAt: string | null;\n expiresAt: string | null;\n};\n\nexport type PluginStatusSnapshot = {\n pluginId: string;\n runtimeMode: 'tool_fetch_only';\n nativeSkillsUrlCompatibility: NativeSkillsUrlCompatibility;\n backendOrigin: string;\n graphqlUrl: string;\n fallbackWorkspaceSlug: string;\n workspaceResolution: WorkspaceResolutionOutput;\n rootSkillSeedPath: string;\n authStatePath: string;\n authState: PluginAuthStateSummary;\n status: FetchResult['status'];\n authMode: FetchResult['authMode'];\n fetchedAt: string;\n source: FetchResult['source'];\n availableTools: string[];\n message: string | null;\n catalog: PublishedSkillsSuccessState | null;\n installableCatalog: {\n count: number;\n skills: PublishedSkillSummary[];\n } | null;\n ignoredPublishedSkills: {\n scopeKey: string;\n userKey: string;\n count: number;\n skills: PublishedSkillSummary[];\n };\n};\n\nexport type AiFacingIgnoredPublishedSkillsSummary = {\n scopeKey: string;\n count: number;\n};\n\nexport type AiFacingPluginStatusSnapshot = Omit<PluginStatusSnapshot, 'ignoredPublishedSkills' | 'installableCatalog'> & {\n ignoredPublishedSkills: AiFacingIgnoredPublishedSkillsSummary;\n};\n\nexport type OidcDiscoveryDocument = {\n authorization_endpoint: string;\n};\n\nexport type PluginSessionResponse = {\n success: true;\n session: {\n jwtToken: string;\n expiresAt: string;\n user: {\n id: string;\n email: string;\n role?: 'ADMIN' | 'EDITOR';\n };\n };\n};\n\nexport type OidcCallbackPayload =\n | {\n status: 'success';\n code: string;\n state: string;\n }\n | {\n status: 'error';\n message: string;\n };\n\nexport type OidcLoginStart = {\n browserUrl: string;\n expiresAt: string;\n codeVerifier: string;\n expectedState: string;\n callbackPromise: Promise<OidcCallbackPayload>;\n closeCallbackServer: () => Promise<void>;\n};\n"],"mappings":"","ignoreList":[]}
package/dist/server.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { AVAILABLE_PUBLISHED_SKILL_TOOLS, resolveAvailableTools, type PublishedSkillFetchArgs, } from './plugin-tools.js';
2
2
  export { buildSkillMarkdown, parseRequestedSkillArgs, selectPublishedSkills, toPublishedSkillDetail, } from './published-skills-transform.js';
3
+ export { planWizardArtifactImport } from './server/import-sources.js';
3
4
  export { PLUGIN_ID, NATIVE_SKILLS_URL_COMPATIBILITY, buildSystemNote, resolveConfig, resolvePluginStatusSnapshot, resolvePluginStatusSnapshotWithAuthBootstrap, setPublishedSkillIgnored, setPublishedSkillInstalled, toPluginAuthStateSummary, toPublishedSkillCatalog, type NativeSkillsUrlCompatibility, type PluginAuthStateSummary, type PluginStatusSnapshot, type PublishedSkillCatalogItem, type PublishedSkillCatalogPayload, type PublishedSkillDetailItem, type PublishedSkillInstallableCatalogItem, } from './server/runtime.js';
4
5
  declare const _default: {
5
6
  id: string;
package/dist/server.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export { AVAILABLE_PUBLISHED_SKILL_TOOLS, resolveAvailableTools } from './plugin-tools.js';
2
2
  export { buildSkillMarkdown, parseRequestedSkillArgs, selectPublishedSkills, toPublishedSkillDetail } from './published-skills-transform.js';
3
+ export { planWizardArtifactImport } from './server/import-sources.js';
3
4
  export { PLUGIN_ID, NATIVE_SKILLS_URL_COMPATIBILITY, buildSystemNote, resolveConfig, resolvePluginStatusSnapshot, resolvePluginStatusSnapshotWithAuthBootstrap, setPublishedSkillIgnored, setPublishedSkillInstalled, toPluginAuthStateSummary, toPublishedSkillCatalog } from './server/runtime.js';
4
5
  import { PLUGIN_ID, OpencodeWizardSkillsPlugin } from './server/runtime.js';
5
6
  export default {
@@ -1 +1 @@
1
- {"version":3,"names":["AVAILABLE_PUBLISHED_SKILL_TOOLS","resolveAvailableTools","buildSkillMarkdown","parseRequestedSkillArgs","selectPublishedSkills","toPublishedSkillDetail","PLUGIN_ID","NATIVE_SKILLS_URL_COMPATIBILITY","buildSystemNote","resolveConfig","resolvePluginStatusSnapshot","resolvePluginStatusSnapshotWithAuthBootstrap","setPublishedSkillIgnored","setPublishedSkillInstalled","toPluginAuthStateSummary","toPublishedSkillCatalog","OpencodeWizardSkillsPlugin","id","server"],"sources":["../src/server.ts"],"sourcesContent":["export {\n AVAILABLE_PUBLISHED_SKILL_TOOLS,\n resolveAvailableTools,\n type PublishedSkillFetchArgs,\n} from './plugin-tools.js';\nexport {\n buildSkillMarkdown,\n parseRequestedSkillArgs,\n selectPublishedSkills,\n toPublishedSkillDetail,\n} from './published-skills-transform.js';\nexport {\n PLUGIN_ID,\n NATIVE_SKILLS_URL_COMPATIBILITY,\n buildSystemNote,\n resolveConfig,\n resolvePluginStatusSnapshot,\n resolvePluginStatusSnapshotWithAuthBootstrap,\n setPublishedSkillIgnored,\n setPublishedSkillInstalled,\n toPluginAuthStateSummary,\n toPublishedSkillCatalog,\n type NativeSkillsUrlCompatibility,\n type PluginAuthStateSummary,\n type PluginStatusSnapshot,\n type PublishedSkillCatalogItem,\n type PublishedSkillCatalogPayload,\n type PublishedSkillDetailItem,\n type PublishedSkillInstallableCatalogItem,\n} from './server/runtime.js';\nimport { PLUGIN_ID, OpencodeWizardSkillsPlugin } from './server/runtime.js';\n\nexport default {\n id: PLUGIN_ID,\n server: OpencodeWizardSkillsPlugin,\n};\n"],"mappings":"AAAA,SACEA,+BAA+B,EAC/BC,qBAAqB,QAEhB,mBAAmB;AAC1B,SACEC,kBAAkB,EAClBC,uBAAuB,EACvBC,qBAAqB,EACrBC,sBAAsB,QACjB,iCAAiC;AACxC,SACEC,SAAS,EACTC,+BAA+B,EAC/BC,eAAe,EACfC,aAAa,EACbC,2BAA2B,EAC3BC,4CAA4C,EAC5CC,wBAAwB,EACxBC,0BAA0B,EAC1BC,wBAAwB,EACxBC,uBAAuB,QAQlB,qBAAqB;AAC5B,SAAST,SAAS,EAAEU,0BAA0B,QAAQ,qBAAqB;AAE3E,eAAe;EACbC,EAAE,EAAEX,SAAS;EACbY,MAAM,EAAEF;AACV,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["AVAILABLE_PUBLISHED_SKILL_TOOLS","resolveAvailableTools","buildSkillMarkdown","parseRequestedSkillArgs","selectPublishedSkills","toPublishedSkillDetail","planWizardArtifactImport","PLUGIN_ID","NATIVE_SKILLS_URL_COMPATIBILITY","buildSystemNote","resolveConfig","resolvePluginStatusSnapshot","resolvePluginStatusSnapshotWithAuthBootstrap","setPublishedSkillIgnored","setPublishedSkillInstalled","toPluginAuthStateSummary","toPublishedSkillCatalog","OpencodeWizardSkillsPlugin","id","server"],"sources":["../src/server.ts"],"sourcesContent":["export {\n AVAILABLE_PUBLISHED_SKILL_TOOLS,\n resolveAvailableTools,\n type PublishedSkillFetchArgs,\n} from './plugin-tools.js';\nexport {\n buildSkillMarkdown,\n parseRequestedSkillArgs,\n selectPublishedSkills,\n toPublishedSkillDetail,\n} from './published-skills-transform.js';\nexport { planWizardArtifactImport } from './server/import-sources.js';\nexport {\n PLUGIN_ID,\n NATIVE_SKILLS_URL_COMPATIBILITY,\n buildSystemNote,\n resolveConfig,\n resolvePluginStatusSnapshot,\n resolvePluginStatusSnapshotWithAuthBootstrap,\n setPublishedSkillIgnored,\n setPublishedSkillInstalled,\n toPluginAuthStateSummary,\n toPublishedSkillCatalog,\n type NativeSkillsUrlCompatibility,\n type PluginAuthStateSummary,\n type PluginStatusSnapshot,\n type PublishedSkillCatalogItem,\n type PublishedSkillCatalogPayload,\n type PublishedSkillDetailItem,\n type PublishedSkillInstallableCatalogItem,\n} from './server/runtime.js';\nimport { PLUGIN_ID, OpencodeWizardSkillsPlugin } from './server/runtime.js';\n\nexport default {\n id: PLUGIN_ID,\n server: OpencodeWizardSkillsPlugin,\n};\n"],"mappings":"AAAA,SACEA,+BAA+B,EAC/BC,qBAAqB,QAEhB,mBAAmB;AAC1B,SACEC,kBAAkB,EAClBC,uBAAuB,EACvBC,qBAAqB,EACrBC,sBAAsB,QACjB,iCAAiC;AACxC,SAASC,wBAAwB,QAAQ,4BAA4B;AACrE,SACEC,SAAS,EACTC,+BAA+B,EAC/BC,eAAe,EACfC,aAAa,EACbC,2BAA2B,EAC3BC,4CAA4C,EAC5CC,wBAAwB,EACxBC,0BAA0B,EAC1BC,wBAAwB,EACxBC,uBAAuB,QAQlB,qBAAqB;AAC5B,SAAST,SAAS,EAAEU,0BAA0B,QAAQ,qBAAqB;AAE3E,eAAe;EACbC,EAAE,EAAEX,SAAS;EACbY,MAAM,EAAEF;AACV,CAAC","ignoreList":[]}
@@ -10,6 +10,5 @@ export declare const Row: (props: {
10
10
  export declare const Panel: (props: {
11
11
  title: string;
12
12
  theme: TuiPluginApi["theme"]["current"];
13
- onOpen: () => void;
14
13
  children: JSX.Element;
15
14
  }) => any;
@@ -37,45 +37,22 @@ export const Row = props => (() => {
37
37
  export const Panel = props => (() => {
38
38
  var _el$5 = _$createElement("box"),
39
39
  _el$6 = _$createElement("box"),
40
- _el$7 = _$createElement("box"),
41
- _el$8 = _$createElement("text"),
42
- _el$9 = _$createElement("b"),
43
- _el$0 = _$createElement("box"),
44
- _el$1 = _$createElement("text");
40
+ _el$7 = _$createElement("text"),
41
+ _el$8 = _$createElement("b");
45
42
  _$insertNode(_el$5, _el$6);
46
43
  _$setProp(_el$5, "width", "100%");
47
44
  _$setProp(_el$5, "flexDirection", "column");
48
45
  _$setProp(_el$5, "paddingRight", 1);
49
46
  _$insertNode(_el$6, _el$7);
50
- _$insertNode(_el$6, _el$0);
51
47
  _$setProp(_el$6, "width", "100%");
52
48
  _$setProp(_el$6, "flexDirection", "row");
53
- _$setProp(_el$6, "justifyContent", "space-between");
54
49
  _$setProp(_el$6, "overflow", "hidden");
55
50
  _$insertNode(_el$7, _el$8);
56
- _$setProp(_el$7, "flexShrink", 0);
57
- _$insertNode(_el$8, _el$9);
58
- _$setProp(_el$8, "wrapMode", "none");
59
- _$setProp(_el$8, "overflow", "hidden");
60
- _$insert(_el$9, () => props.title);
61
- _$insertNode(_el$0, _el$1);
62
- _$setProp(_el$0, "flexShrink", 0);
63
- _$insertNode(_el$1, _$createTextNode(`open`));
64
- _$setProp(_el$1, "wrapMode", "none");
51
+ _$setProp(_el$7, "wrapMode", "none");
52
+ _$setProp(_el$7, "overflow", "hidden");
53
+ _$insert(_el$8, () => props.title);
65
54
  _$insert(_el$5, () => props.children, null);
66
- _$effect(_p$ => {
67
- var _v$3 = props.onOpen,
68
- _v$4 = props.theme.text,
69
- _v$5 = props.theme.textMuted;
70
- _v$3 !== _p$.e && (_p$.e = _$setProp(_el$5, "onMouseUp", _v$3, _p$.e));
71
- _v$4 !== _p$.t && (_p$.t = _$setProp(_el$8, "fg", _v$4, _p$.t));
72
- _v$5 !== _p$.a && (_p$.a = _$setProp(_el$1, "fg", _v$5, _p$.a));
73
- return _p$;
74
- }, {
75
- e: undefined,
76
- t: undefined,
77
- a: undefined
78
- });
55
+ _$effect(_$p => _$setProp(_el$7, "fg", props.theme.text, _$p));
79
56
  return _el$5;
80
57
  })();
81
58
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Row","props","_el$","_$createElement","_el$2","_el$3","_$createTextNode","_el$4","_$insertNode","_$setProp","_$insert","label","value","_$effect","_p$","_v$","labelColor","_v$2","valueColor","e","t","undefined","Panel","_el$5","_el$6","_el$7","_el$8","_el$9","_el$0","_el$1","title","children","_v$3","onOpen","_v$4","theme","text","_v$5","textMuted","a"],"sources":["../../../src/tui/components/common.tsx"],"sourcesContent":["import type { RGBA } from '@opentui/core';\nimport type { JSX } from 'solid-js';\nimport type { TuiPluginApi } from '../types.js';\n\nexport const Row = (props: {\n label: string;\n value: string;\n labelColor: string | RGBA | undefined;\n valueColor: string | RGBA | undefined;\n}) => (\n <box width=\"100%\" flexDirection=\"row\" overflow=\"hidden\">\n <text fg={props.labelColor} flexShrink={0} wrapMode=\"none\">\n {props.label}:&nbsp;\n </text>\n <text fg={props.valueColor} flexGrow={1} overflow=\"hidden\" wrapMode=\"none\">\n {props.value}\n </text>\n </box>\n);\n\nexport const Panel = (props: {\n title: string;\n theme: TuiPluginApi['theme']['current'];\n onOpen: () => void;\n children: JSX.Element;\n}) => (\n <box width=\"100%\" flexDirection=\"column\" paddingRight={1} onMouseUp={props.onOpen}>\n <box width=\"100%\" flexDirection=\"row\" justifyContent=\"space-between\" overflow=\"hidden\">\n <box flexShrink={0}>\n <text fg={props.theme.text} wrapMode=\"none\" overflow=\"hidden\">\n <b>{props.title}</b>\n </text>\n </box>\n <box flexShrink={0}>\n <text fg={props.theme.textMuted} wrapMode=\"none\">\n open\n </text>\n </box>\n </box>\n {props.children}\n </box>\n);\n"],"mappings":";;;;;;AAIA,OAAO,MAAM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hBpC,KAAK,CAACkC,KAAK,CAACG,SAAS;IAAAN,IAAA,KAAAlB,GAAA,CAAAK,CAAA,KAAAL,GAAA,CAAAK,CAAA,GAAAV,SAAA,CAAAc,KAAA,eAAAS,IAAA,EAAAlB,GAAA,CAAAK,CAAA;IAAAe,IAAA,KAAApB,GAAA,CAAAM,CAAA,KAAAN,GAAA,CAAAM,CAAA,GAAAX,SAAA,CAAAiB,KAAA,QAAAQ,IAAA,EAAApB,GAAA,CAAAM,CAAA;IAAAiB,IAAA,KAAAvB,GAAA,CAAAyB,CAAA,KAAAzB,GAAA,CAAAyB,CAAA,GAAA9B,SAAA,CAAAoB,KAAA,QAAAQ,IAAA,EAAAvB,GAAA,CAAAyB,CAAA;IAAA,OAAAzB,GAAA;EAAA;IAAAK,CAAA,EAAAE,SAAA;IAAAD,CAAA,EAAAC,SAAA;IAAAkB,CAAA,EAAAlB;EAAA;EAAA,OAAAE,KAAA;AAAA,IAOtC","ignoreList":[]}
1
+ {"version":3,"names":["Row","props","_el$","_$createElement","_el$2","_el$3","_$createTextNode","_el$4","_$insertNode","_$setProp","_$insert","label","value","_$effect","_p$","_v$","labelColor","_v$2","valueColor","e","t","undefined","Panel","_el$5","_el$6","_el$7","_el$8","title","children","_$p","theme","text"],"sources":["../../../src/tui/components/common.tsx"],"sourcesContent":["import type { RGBA } from '@opentui/core';\nimport type { JSX } from 'solid-js';\nimport type { TuiPluginApi } from '../types.js';\n\nexport const Row = (props: {\n label: string;\n value: string;\n labelColor: string | RGBA | undefined;\n valueColor: string | RGBA | undefined;\n}) => (\n <box width=\"100%\" flexDirection=\"row\" overflow=\"hidden\">\n <text fg={props.labelColor} flexShrink={0} wrapMode=\"none\">\n {props.label}:&nbsp;\n </text>\n <text fg={props.valueColor} flexGrow={1} overflow=\"hidden\" wrapMode=\"none\">\n {props.value}\n </text>\n </box>\n);\n\nexport const Panel = (props: {\n title: string;\n theme: TuiPluginApi['theme']['current'];\n children: JSX.Element;\n}) => (\n <box width=\"100%\" flexDirection=\"column\" paddingRight={1}>\n <box width=\"100%\" flexDirection=\"row\" overflow=\"hidden\">\n <text fg={props.theme.text} wrapMode=\"none\" overflow=\"hidden\">\n <b>{props.title}</b>\n </text>\n </box>\n {props.children}\n </box>\n);\n"],"mappings":";;;;;;AAIA,OAAO,MAAMA,GAAG,GAAIC,KAKnB;EAAA,IAAAC,IAAA,GAAAC,eAAA;IAAAC,KAAA,GAAAD,eAAA;IAAAE,KAAA,GAAAC,gBAAA;IAAAC,KAAA,GAAAJ,eAAA;EAAAK,YAAA,CAAAN,IAAA,EAAAE,KAAA;EAAAI,YAAA,CAAAN,IAAA,EAAAK,KAAA;EAAAE,SAAA,CAAAP,IAAA,WACY,MAAM;EAAAO,SAAA,CAAAP,IAAA,mBAAe,KAAK;EAAAO,SAAA,CAAAP,IAAA,cAAU,QAAQ;EAAAM,YAAA,CAAAJ,KAAA,EAAAC,KAAA;EAAAI,SAAA,CAAAL,KAAA,gBACb,CAAC;EAAAK,SAAA,CAAAL,KAAA,cAAW,MAAM;EAAAM,QAAA,CAAAN,KAAA,QACvDH,KAAK,CAACU,KAAK,EAAAN,KAAA;EAAAI,SAAA,CAAAF,KAAA,cAEwB,CAAC;EAAAE,SAAA,CAAAF,KAAA,cAAW,QAAQ;EAAAE,SAAA,CAAAF,KAAA,cAAU,MAAM;EAAAG,QAAA,CAAAH,KAAA,QACvEN,KAAK,CAACW,KAAK;EAAAC,QAAA,CAAAC,GAAA;IAAA,IAAAC,GAAA,GAJJd,KAAK,CAACe,UAAU;MAAAC,IAAA,GAGhBhB,KAAK,CAACiB,UAAU;IAAAH,GAAA,KAAAD,GAAA,CAAAK,CAAA,KAAAL,GAAA,CAAAK,CAAA,GAAAV,SAAA,CAAAL,KAAA,QAAAW,GAAA,EAAAD,GAAA,CAAAK,CAAA;IAAAF,IAAA,KAAAH,GAAA,CAAAM,CAAA,KAAAN,GAAA,CAAAM,CAAA,GAAAX,SAAA,CAAAF,KAAA,QAAAU,IAAA,EAAAH,GAAA,CAAAM,CAAA;IAAA,OAAAN,GAAA;EAAA;IAAAK,CAAA,EAAAE,SAAA;IAAAD,CAAA,EAAAC;EAAA;EAAA,OAAAnB,IAAA;AAAA,IAI7B;AAED,OAAO,MAAMoB,KAAK,GAAIrB,KAIrB;EAAA,IAAAsB,KAAA,GAAApB,eAAA;IAAAqB,KAAA,GAAArB,eAAA;IAAAsB,KAAA,GAAAtB,eAAA;IAAAuB,KAAA,GAAAvB,eAAA;EAAAK,YAAA,CAAAe,KAAA,EAAAC,KAAA;EAAAf,SAAA,CAAAc,KAAA,WACY,MAAM;EAAAd,SAAA,CAAAc,KAAA,mBAAe,QAAQ;EAAAd,SAAA,CAAAc,KAAA,kBAAe,CAAC;EAAAf,YAAA,CAAAgB,KAAA,EAAAC,KAAA;EAAAhB,SAAA,CAAAe,KAAA,WAC3C,MAAM;EAAAf,SAAA,CAAAe,KAAA,mBAAe,KAAK;EAAAf,SAAA,CAAAe,KAAA,cAAU,QAAQ;EAAAhB,YAAA,CAAAiB,KAAA,EAAAC,KAAA;EAAAjB,SAAA,CAAAgB,KAAA,cAChB,MAAM;EAAAhB,SAAA,CAAAgB,KAAA,cAAU,QAAQ;EAAAf,QAAA,CAAAgB,KAAA,QACvDzB,KAAK,CAAC0B,KAAK;EAAAjB,QAAA,CAAAa,KAAA,QAGlBtB,KAAK,CAAC2B,QAAQ;EAAAf,QAAA,CAAAgB,GAAA,IAAApB,SAAA,CAAAgB,KAAA,QAJHxB,KAAK,CAAC6B,KAAK,CAACC,IAAI,EAAAF,GAAA;EAAA,OAAAN,KAAA;AAAA,IAM/B","ignoreList":[]}
@@ -108,7 +108,7 @@ export const ReadyRows = props => {
108
108
  })();
109
109
  }
110
110
  const installableNotInstalledCount = getInstallableNotInstalledSkills(props.snapshot).length;
111
- const catalogStatus = `${props.snapshot.catalog.publishedSkillCount} loaded · ${installableNotInstalledCount} installable · ${props.snapshot.ignoredPublishedSkills.count} ignored · open for details`;
111
+ const catalogStatus = `${props.snapshot.catalog.publishedSkillCount} loaded · ${installableNotInstalledCount} installable · ${props.snapshot.ignoredPublishedSkills.count} ignored`;
112
112
  return (() => {
113
113
  var _el$7 = _$createElement("box");
114
114
  _$setProp(_el$7, "width", "100%");
@@ -1 +1 @@
1
- {"version":3,"names":["createMemo","compactStatusMessage","formatAuthStatus","formatBackendOriginLabel","formatSkillsCatalogUnavailableMessage","getInstallableNotInstalledSkills","Row","StatusContent","props","status","kind","_el$","_$createElement","_$insertNode","_$createTextNode","_$setProp","_$effect","_$p","theme","textMuted","_el$3","_el$4","_$insert","message","warning","_$createComponent","ReadyRows","snapshot","SkillsRows","api","current","statusContent","currentStatus","_el$5","statusRows","label","value","backendOrigin","labelColor","valueColor","text","catalog","_el$6","installableNotInstalledCount","length","catalogStatus","publishedSkillCount","ignoredPublishedSkills","count","_el$7"],"sources":["../../../src/tui/components/status-content.tsx"],"sourcesContent":["import { createMemo } from 'solid-js';\nimport type { PluginStatusSnapshot } from '../../server.js';\nimport { compactStatusMessage, formatAuthStatus, formatBackendOriginLabel, formatSkillsCatalogUnavailableMessage } from '../formatting.js';\nimport { getInstallableNotInstalledSkills } from '../skill-helpers.js';\nimport type { StatusState, TuiPluginApi } from '../types.js';\nimport { Row } from './common.js';\n\nexport const StatusContent = (props: { status: StatusState; theme: TuiPluginApi['theme']['current'] }) => {\n if (props.status.kind === 'loading') {\n return (\n <text fg={props.theme.textMuted} wrapMode=\"none\" overflow=\"hidden\">\n loading…\n </text>\n );\n }\n\n if (props.status.kind === 'error') {\n return (\n <text fg={props.theme.warning} wrapMode=\"none\" overflow=\"hidden\">\n unavailable: {compactStatusMessage(props.status.message)}\n </text>\n );\n }\n\n return <ReadyRows snapshot={props.status.snapshot} theme={props.theme} />;\n};\n\nexport const SkillsRows = (props: { api: TuiPluginApi; status: () => StatusState }) => {\n const theme = createMemo(() => props.api.theme.current);\n const statusContent = () => {\n const currentStatus = props.status();\n\n return <StatusContent status={currentStatus} theme={theme()} />;\n };\n\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n {statusContent()}\n </box>\n );\n};\n\nexport const ReadyRows = (props: { snapshot: PluginStatusSnapshot; theme: TuiPluginApi['theme']['current'] }) => {\n const statusRows = (\n <>\n <Row\n label=\"url\"\n value={formatBackendOriginLabel(props.snapshot.backendOrigin)}\n labelColor={props.theme.textMuted}\n valueColor={props.theme.text}\n />\n <Row label=\"auth\" value={formatAuthStatus(props.snapshot)} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n </>\n );\n\n if (!props.snapshot.catalog) {\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n {statusRows}\n <Row\n label=\"catalog\"\n value={formatSkillsCatalogUnavailableMessage(props.snapshot)}\n labelColor={props.theme.textMuted}\n valueColor={props.theme.text}\n />\n </box>\n );\n }\n\n const installableNotInstalledCount = getInstallableNotInstalledSkills(props.snapshot).length;\n const catalogStatus = `${props.snapshot.catalog.publishedSkillCount} loaded · ${installableNotInstalledCount} installable · ${props.snapshot.ignoredPublishedSkills.count} ignored · open for details`;\n\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n {statusRows}\n <Row label=\"catalog\" value={catalogStatus} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n </box>\n );\n};\n"],"mappings":";;;;;;;AAAA,SAASA,UAAU,QAAQ,UAAU;AAErC,SAASC,oBAAoB,EAAEC,gBAAgB,EAAEC,wBAAwB,EAAEC,qCAAqC,QAAQ,kBAAkB;AAC1I,SAASC,gCAAgC,QAAQ,qBAAqB;AAEtE,SAASC,GAAG,QAAQ,aAAa;AAEjC,OAAO,MAAMC,aAAa,GAAIC,KAAuE,IAAK;EACxG,IAAIA,KAAK,CAACC,MAAM,CAACC,IAAI,KAAK,SAAS,EAAE;IACnC;MAAA,IAAAC,IAAA,GAAAC,eAAA;MAAAC,YAAA,CAAAF,IAAA,EAAAG,gBAAA;MAAAC,SAAA,CAAAJ,IAAA,cAC4C,MAAM;M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,KAAK;QAAA,IACLC,KAAKA,CAAA;UAAA,OAAEhC,qCAAqC,CAACI,KAAK,CAACmB,QAAQ,CAAC;QAAA;QAAA,IAC5DW,UAAUA,CAAA;UAAA,OAAE9B,KAAK,CAACU,KAAK,CAACC,SAAS;QAAA;QAAA,IACjCoB,UAAUA,CAAA;UAAA,OAAE/B,KAAK,CAACU,KAAK,CAACsB,IAAI;QAAA;MAAA;MAAA,OAAAE,KAAA;IAAA;EAIpC;EAEA,MAAMC,4BAA4B,GAAGtC,gCAAgC,CAACG,KAAK,CAACmB,QAAQ,CAAC,CAACiB,MAAM;EAC5F,MAAMC,aAAa,GAAG,GAAGrC,KAAK,CAACmB,QAAQ,CAACc,OAAO,CAACK,mBAAmB,aAAaH,4BAA4B,kBAAkBnC,KAAK,CAACmB,QAAQ,CAACoB,sBAAsB,CAACC,KAAK,6BAA6B;EAEtM;IAAA,IAAAC,KAAA,GAAArC,eAAA;IAAAG,SAAA,CAAAkC,KAAA,WACa,MAAM;IAAAlC,SAAA,CAAAkC,KAAA,mBAAe,QAAQ;IAAAlC,SAAA,CAAAkC,KAAA,cAAU,QAAQ;IAAA3B,QAAA,CAAA2B,KAAA,EACvDf,UAAU;IAAAZ,QAAA,CAAA2B,KAAA,EAAAxB,iBAAA,CACVnB,GAAG;MAAC6B,KAAK;MAAWC,KAAK,EAAES,aAAa;MAAA,IAAEP,UAAUA,CAAA;QAAA,OAAE9B,KAAK,CAACU,KAAK,CAACC,SAAS;MAAA;MAAA,IAAEoB,UAAUA,CAAA;QAAA,OAAE/B,KAAK,CAACU,KAAK,CAACsB,IAAI;MAAA;IAAA;IAAA,OAAAS,KAAA;EAAA;AAGhH,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createMemo","compactStatusMessage","formatAuthStatus","formatBackendOriginLabel","formatSkillsCatalogUnavailableMessage","getInstallableNotInstalledSkills","Row","StatusContent","props","status","kind","_el$","_$createElement","_$insertNode","_$createTextNode","_$setProp","_$effect","_$p","theme","textMuted","_el$3","_el$4","_$insert","message","warning","_$createComponent","ReadyRows","snapshot","SkillsRows","api","current","statusContent","currentStatus","_el$5","statusRows","label","value","backendOrigin","labelColor","valueColor","text","catalog","_el$6","installableNotInstalledCount","length","catalogStatus","publishedSkillCount","ignoredPublishedSkills","count","_el$7"],"sources":["../../../src/tui/components/status-content.tsx"],"sourcesContent":["import { createMemo } from 'solid-js';\nimport type { PluginStatusSnapshot } from '../../server.js';\nimport { compactStatusMessage, formatAuthStatus, formatBackendOriginLabel, formatSkillsCatalogUnavailableMessage } from '../formatting.js';\nimport { getInstallableNotInstalledSkills } from '../skill-helpers.js';\nimport type { StatusState, TuiPluginApi } from '../types.js';\nimport { Row } from './common.js';\n\nexport const StatusContent = (props: { status: StatusState; theme: TuiPluginApi['theme']['current'] }) => {\n if (props.status.kind === 'loading') {\n return (\n <text fg={props.theme.textMuted} wrapMode=\"none\" overflow=\"hidden\">\n loading…\n </text>\n );\n }\n\n if (props.status.kind === 'error') {\n return (\n <text fg={props.theme.warning} wrapMode=\"none\" overflow=\"hidden\">\n unavailable: {compactStatusMessage(props.status.message)}\n </text>\n );\n }\n\n return <ReadyRows snapshot={props.status.snapshot} theme={props.theme} />;\n};\n\nexport const SkillsRows = (props: { api: TuiPluginApi; status: () => StatusState }) => {\n const theme = createMemo(() => props.api.theme.current);\n const statusContent = () => {\n const currentStatus = props.status();\n\n return <StatusContent status={currentStatus} theme={theme()} />;\n };\n\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n {statusContent()}\n </box>\n );\n};\n\nexport const ReadyRows = (props: { snapshot: PluginStatusSnapshot; theme: TuiPluginApi['theme']['current'] }) => {\n const statusRows = (\n <>\n <Row\n label=\"url\"\n value={formatBackendOriginLabel(props.snapshot.backendOrigin)}\n labelColor={props.theme.textMuted}\n valueColor={props.theme.text}\n />\n <Row label=\"auth\" value={formatAuthStatus(props.snapshot)} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n </>\n );\n\n if (!props.snapshot.catalog) {\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n {statusRows}\n <Row\n label=\"catalog\"\n value={formatSkillsCatalogUnavailableMessage(props.snapshot)}\n labelColor={props.theme.textMuted}\n valueColor={props.theme.text}\n />\n </box>\n );\n }\n\n const installableNotInstalledCount = getInstallableNotInstalledSkills(props.snapshot).length;\n const catalogStatus = `${props.snapshot.catalog.publishedSkillCount} loaded · ${installableNotInstalledCount} installable · ${props.snapshot.ignoredPublishedSkills.count} ignored`;\n\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n {statusRows}\n <Row label=\"catalog\" value={catalogStatus} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n </box>\n );\n};\n"],"mappings":";;;;;;;AAAA,SAASA,UAAU,QAAQ,UAAU;AAErC,SAASC,oBAAoB,EAAEC,gBAAgB,EAAEC,wBAAwB,EAAEC,qCAAqC,QAAQ,kBAAkB;AAC1I,SAASC,gCAAgC,QAAQ,qBAAqB;AAEtE,SAASC,GAAG,QAAQ,aAAa;AAEjC,OAAO,MAAMC,aAAa,GAAIC,KAAuE,IAAK;EACxG,IAAIA,KAAK,CAACC,MAAM,CAACC,IAAI,KAAK,SAAS,EAAE;IACnC;MAAA,IAAAC,IAAA,GAAAC,eAAA;MAAAC,YAAA,CAAAF,IAAA,EAAAG,gBAAA;MAAAC,SAAA,CAAAJ,IAAA,cAC4C,MAAM;MAAAI,SAAA,CAAAJ,IAAA,cAAU,QAAQ;MAAAK,QAAA,CAAAC,GAAA,IAAAF,SAAA,CAAAJ,IAAA,QAAxDH,KAAK,CAACU,KAAK,CAACC,SAAS,EAAAF,GAAA;MAAA,OAAAN,IAAA;IAAA;EAInC;EAEA,IAAIH,KAAK,CAACC,MAAM,CAACC,IAAI,KAAK,OAAO,EAAE;IACjC;MAAA,IAAAU,KAAA,GAAAR,eAAA;QAAAS,KAAA,GAAAP,gBAAA;MAAAD,YAAA,CAAAO,KAAA,EAAAC,KAAA;MA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,QAAQ,CAAC,CAACiB,MAAM;EAC5F,MAAMC,aAAa,GAAG,GAAGrC,KAAK,CAACmB,QAAQ,CAACc,OAAO,CAACK,mBAAmB,aAAaH,4BAA4B,kBAAkBnC,KAAK,CAACmB,QAAQ,CAACoB,sBAAsB,CAACC,KAAK,UAAU;EAEnL;IAAA,IAAAC,KAAA,GAAArC,eAAA;IAAAG,SAAA,CAAAkC,KAAA,WACa,MAAM;IAAAlC,SAAA,CAAAkC,KAAA,mBAAe,QAAQ;IAAAlC,SAAA,CAAAkC,KAAA,cAAU,QAAQ;IAAA3B,QAAA,CAAA2B,KAAA,EACvDf,UAAU;IAAAZ,QAAA,CAAA2B,KAAA,EAAAxB,iBAAA,CACVnB,GAAG;MAAC6B,KAAK;MAAWC,KAAK,EAAES,aAAa;MAAA,IAAEP,UAAUA,CAAA;QAAA,OAAE9B,KAAK,CAACU,KAAK,CAACC,SAAS;MAAA;MAAA,IAAEoB,UAAUA,CAAA;QAAA,OAAE/B,KAAK,CAACU,KAAK,CAACsB,IAAI;MAAA;IAAA;IAAA,OAAAS,KAAA;EAAA;AAGhH,CAAC","ignoreList":[]}
@@ -1,8 +1,3 @@
1
1
  export declare const STATUS_TIMEOUT_MS = 5000;
2
2
  export declare const STATUS_REFRESH_INTERVAL_MS = 5000;
3
3
  export declare const MAX_STATUS_MESSAGE_LENGTH = 80;
4
- export declare const MAX_SKILL_DESCRIPTION_LENGTH = 96;
5
- export declare const MAX_SKILL_NAME_LENGTH = 48;
6
- export declare const MAX_SKILL_META_LENGTH = 72;
7
- export declare const MAX_SKILL_TAGS = 4;
8
- export declare const SKILLS_PAGE_SIZE = 5;
@@ -1,9 +1,4 @@
1
1
  export const STATUS_TIMEOUT_MS = 5_000;
2
2
  export const STATUS_REFRESH_INTERVAL_MS = 5_000;
3
3
  export const MAX_STATUS_MESSAGE_LENGTH = 80;
4
- export const MAX_SKILL_DESCRIPTION_LENGTH = 96;
5
- export const MAX_SKILL_NAME_LENGTH = 48;
6
- export const MAX_SKILL_META_LENGTH = 72;
7
- export const MAX_SKILL_TAGS = 4;
8
- export const SKILLS_PAGE_SIZE = 5;
9
4
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["STATUS_TIMEOUT_MS","STATUS_REFRESH_INTERVAL_MS","MAX_STATUS_MESSAGE_LENGTH","MAX_SKILL_DESCRIPTION_LENGTH","MAX_SKILL_NAME_LENGTH","MAX_SKILL_META_LENGTH","MAX_SKILL_TAGS","SKILLS_PAGE_SIZE"],"sources":["../../src/tui/constants.ts"],"sourcesContent":["export const STATUS_TIMEOUT_MS = 5_000;\nexport const STATUS_REFRESH_INTERVAL_MS = 5_000;\nexport const MAX_STATUS_MESSAGE_LENGTH = 80;\nexport const MAX_SKILL_DESCRIPTION_LENGTH = 96;\nexport const MAX_SKILL_NAME_LENGTH = 48;\nexport const MAX_SKILL_META_LENGTH = 72;\nexport const MAX_SKILL_TAGS = 4;\nexport const SKILLS_PAGE_SIZE = 5;\n"],"mappings":"AAAA,OAAO,MAAMA,iBAAiB,GAAG,KAAK;AACtC,OAAO,MAAMC,0BAA0B,GAAG,KAAK;AAC/C,OAAO,MAAMC,yBAAyB,GAAG,EAAE;AAC3C,OAAO,MAAMC,4BAA4B,GAAG,EAAE;AAC9C,OAAO,MAAMC,qBAAqB,GAAG,EAAE;AACvC,OAAO,MAAMC,qBAAqB,GAAG,EAAE;AACvC,OAAO,MAAMC,cAAc,GAAG,CAAC;AAC/B,OAAO,MAAMC,gBAAgB,GAAG,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["STATUS_TIMEOUT_MS","STATUS_REFRESH_INTERVAL_MS","MAX_STATUS_MESSAGE_LENGTH"],"sources":["../../src/tui/constants.ts"],"sourcesContent":["export const STATUS_TIMEOUT_MS = 5_000;\nexport const STATUS_REFRESH_INTERVAL_MS = 5_000;\nexport const MAX_STATUS_MESSAGE_LENGTH = 80;\n"],"mappings":"AAAA,OAAO,MAAMA,iBAAiB,GAAG,KAAK;AACtC,OAAO,MAAMC,0BAA0B,GAAG,KAAK;AAC/C,OAAO,MAAMC,yBAAyB,GAAG,EAAE","ignoreList":[]}
@@ -1,8 +1,5 @@
1
1
  import type { PluginStatusSnapshot } from '../server.js';
2
2
  export declare const compactStatusMessage: (message: string) => string;
3
- export declare const compactSkillDescription: (message: string) => string;
4
- export declare const compactSkillName: (name: string) => string;
5
- export declare const compactSkillMeta: (meta: string) => string;
6
3
  export declare const formatSkillsCatalogUnavailableMessage: (snapshot: PluginStatusSnapshot) => string;
7
4
  export declare const formatAuthStatus: (snapshot: PluginStatusSnapshot) => string;
8
5
  export declare const formatBackendOriginLabel: (backendOrigin: string) => string;
@@ -1,20 +1,8 @@
1
- import { MAX_SKILL_DESCRIPTION_LENGTH, MAX_SKILL_META_LENGTH, MAX_SKILL_NAME_LENGTH, MAX_STATUS_MESSAGE_LENGTH } from './constants.js';
1
+ import { MAX_STATUS_MESSAGE_LENGTH } from './constants.js';
2
2
  export const compactStatusMessage = message => {
3
3
  if (message.length <= MAX_STATUS_MESSAGE_LENGTH) return message;
4
4
  return `${message.slice(0, MAX_STATUS_MESSAGE_LENGTH - 1)}…`;
5
5
  };
6
- export const compactSkillDescription = message => {
7
- if (message.length <= MAX_SKILL_DESCRIPTION_LENGTH) return message;
8
- return `${message.slice(0, MAX_SKILL_DESCRIPTION_LENGTH - 1)}…`;
9
- };
10
- export const compactSkillName = name => {
11
- if (name.length <= MAX_SKILL_NAME_LENGTH) return name;
12
- return `${name.slice(0, MAX_SKILL_NAME_LENGTH - 1)}…`;
13
- };
14
- export const compactSkillMeta = meta => {
15
- if (meta.length <= MAX_SKILL_META_LENGTH) return meta;
16
- return `${meta.slice(0, MAX_SKILL_META_LENGTH - 1)}…`;
17
- };
18
6
  export const formatSkillsCatalogUnavailableMessage = snapshot => {
19
7
  if (!snapshot.catalog && snapshot.status === 'missing_auth') {
20
8
  if (snapshot.message) return compactStatusMessage(snapshot.message);
@@ -1 +1 @@
1
- {"version":3,"names":["MAX_SKILL_DESCRIPTION_LENGTH","MAX_SKILL_META_LENGTH","MAX_SKILL_NAME_LENGTH","MAX_STATUS_MESSAGE_LENGTH","compactStatusMessage","message","length","slice","compactSkillDescription","compactSkillName","name","compactSkillMeta","meta","formatSkillsCatalogUnavailableMessage","snapshot","catalog","status","formatAuthStatus","roleLabel","authState","role","email","formatBackendOriginLabel","backendOrigin","hostname","URL","includes"],"sources":["../../src/tui/formatting.ts"],"sourcesContent":["import type { PluginStatusSnapshot } from '../server.js';\nimport {\n MAX_SKILL_DESCRIPTION_LENGTH,\n MAX_SKILL_META_LENGTH,\n MAX_SKILL_NAME_LENGTH,\n MAX_STATUS_MESSAGE_LENGTH,\n} from './constants.js';\n\nexport const compactStatusMessage = (message: string): string => {\n if (message.length <= MAX_STATUS_MESSAGE_LENGTH) return message;\n\n return `${message.slice(0, MAX_STATUS_MESSAGE_LENGTH - 1)}…`;\n};\n\nexport const compactSkillDescription = (message: string): string => {\n if (message.length <= MAX_SKILL_DESCRIPTION_LENGTH) return message;\n\n return `${message.slice(0, MAX_SKILL_DESCRIPTION_LENGTH - 1)}…`;\n};\n\nexport const compactSkillName = (name: string): string => {\n if (name.length <= MAX_SKILL_NAME_LENGTH) return name;\n\n return `${name.slice(0, MAX_SKILL_NAME_LENGTH - 1)}…`;\n};\n\nexport const compactSkillMeta = (meta: string): string => {\n if (meta.length <= MAX_SKILL_META_LENGTH) return meta;\n\n return `${meta.slice(0, MAX_SKILL_META_LENGTH - 1)}…`;\n};\n\nexport const formatSkillsCatalogUnavailableMessage = (snapshot: PluginStatusSnapshot): string => {\n if (!snapshot.catalog && snapshot.status === 'missing_auth') {\n if (snapshot.message) return compactStatusMessage(snapshot.message);\n\n return 'locked (browser auth pending)';\n }\n\n if (!snapshot.catalog && snapshot.message) return compactStatusMessage(snapshot.message);\n if (!snapshot.catalog) return `unavailable (${snapshot.status})`;\n\n return 'unavailable';\n};\n\nexport const formatAuthStatus = (snapshot: PluginStatusSnapshot): string => {\n const roleLabel = snapshot.authState.role ? ` [${snapshot.authState.role}]` : '';\n if (snapshot.authState.status !== 'authenticated') return `${snapshot.authState.status}${roleLabel}`;\n if (!snapshot.authState.email) return `authenticated${roleLabel}`;\n\n return `${snapshot.authState.email}${roleLabel}`;\n};\n\nexport const formatBackendOriginLabel = (backendOrigin: string): string => {\n try {\n const { hostname } = new URL(backendOrigin);\n if (hostname === 'localhost' || hostname === '127.0.0.1') return 'localhost';\n\n return 'opencode-wizard';\n } catch {\n if (backendOrigin.includes('localhost') || backendOrigin.includes('127.0.0.1')) return 'localhost';\n\n return 'opencode-wizard';\n }\n};\n"],"mappings":"AACA,SACEA,4BAA4B,EAC5BC,qBAAqB,EACrBC,qBAAqB,EACrBC,yBAAyB,QACpB,gBAAgB;AAEvB,OAAO,MAAMC,oBAAoB,GAAIC,OAAe,IAAa;EAC/D,IAAIA,OAAO,CAACC,MAAM,IAAIH,yBAAyB,EAAE,OAAOE,OAAO;EAE/D,OAAO,GAAGA,OAAO,CAACE,KAAK,CAAC,CAAC,EAAEJ,yBAAyB,GAAG,CAAC,CAAC,GAAG;AAC9D,CAAC;AAED,OAAO,MAAMK,uBAAuB,GAAIH,OAAe,IAAa;EAClE,IAAIA,OAAO,CAACC,MAAM,IAAIN,4BAA4B,EAAE,OAAOK,OAAO;EAElE,OAAO,GAAGA,OAAO,CAACE,KAAK,CAAC,CAAC,EAAEP,4BAA4B,GAAG,CAAC,CAAC,GAAG;AACjE,CAAC;AAED,OAAO,MAAMS,gBAAgB,GAAIC,IAAY,IAAa;EACxD,IAAIA,IAAI,CAACJ,MAAM,IAAIJ,qBAAqB,EAAE,OAAOQ,IAAI;EAErD,OAAO,GAAGA,IAAI,CAACH,KAAK,CAAC,CAAC,EAAEL,qBAAqB,GAAG,CAAC,CAAC,GAAG;AACvD,CAAC;AAED,OAAO,MAAMS,gBAAgB,GAAIC,IAAY,IAAa;EACxD,IAAIA,IAAI,CAACN,MAAM,IAAIL,qBAAqB,EAAE,OAAOW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,EAAE,OAAO,WAAW;IAE5E,OAAO,iBAAiB;EAC1B,CAAC,CAAC,MAAM;IACN,IAAID,aAAa,CAACG,QAAQ,CAAC,WAAW,CAAC,IAAIH,aAAa,CAACG,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,WAAW;IAElG,OAAO,iBAAiB;EAC1B;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["MAX_STATUS_MESSAGE_LENGTH","compactStatusMessage","message","length","slice","formatSkillsCatalogUnavailableMessage","snapshot","catalog","status","formatAuthStatus","roleLabel","authState","role","email","formatBackendOriginLabel","backendOrigin","hostname","URL","includes"],"sources":["../../src/tui/formatting.ts"],"sourcesContent":["import type { PluginStatusSnapshot } from '../server.js';\nimport { MAX_STATUS_MESSAGE_LENGTH } from './constants.js';\n\nexport const compactStatusMessage = (message: string): string => {\n if (message.length <= MAX_STATUS_MESSAGE_LENGTH) return message;\n\n return `${message.slice(0, MAX_STATUS_MESSAGE_LENGTH - 1)}…`;\n};\n\nexport const formatSkillsCatalogUnavailableMessage = (snapshot: PluginStatusSnapshot): string => {\n if (!snapshot.catalog && snapshot.status === 'missing_auth') {\n if (snapshot.message) return compactStatusMessage(snapshot.message);\n\n return 'locked (browser auth pending)';\n }\n\n if (!snapshot.catalog && snapshot.message) return compactStatusMessage(snapshot.message);\n if (!snapshot.catalog) return `unavailable (${snapshot.status})`;\n\n return 'unavailable';\n};\n\nexport const formatAuthStatus = (snapshot: PluginStatusSnapshot): string => {\n const roleLabel = snapshot.authState.role ? ` [${snapshot.authState.role}]` : '';\n if (snapshot.authState.status !== 'authenticated') return `${snapshot.authState.status}${roleLabel}`;\n if (!snapshot.authState.email) return `authenticated${roleLabel}`;\n\n return `${snapshot.authState.email}${roleLabel}`;\n};\n\nexport const formatBackendOriginLabel = (backendOrigin: string): string => {\n try {\n const { hostname } = new URL(backendOrigin);\n if (hostname === 'localhost' || hostname === '127.0.0.1') return 'localhost';\n\n return 'opencode-wizard';\n } catch {\n if (backendOrig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AS,CAACE,KAAK,GAAGH,SAAS,EAAE;AAClD,CAAC;AAED,OAAO,MAAMI,wBAAwB,GAAIC,aAAqB,IAAa;EACzE,IAAI;IACF,MAAM;MAAEC;IAAS,CAAC,GAAG,IAAIC,GAAG,CAACF,aAAa,CAAC;IAC3C,IAAIC,QAAQ,KAAK,WAAW,IAAIA,QAAQ,KAAK,WAAW,EAAE,OAAO,WAAW;IAE5E,OAAO,iBAAiB;EAC1B,CAAC,CAAC,MAAM;IACN,IAAID,aAAa,CAACG,QAAQ,CAAC,WAAW,CAAC,IAAIH,aAAa,CAACG,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,WAAW;IAElG,OAAO,iBAAiB;EAC1B;AACF,CAAC","ignoreList":[]}
@@ -1,13 +1,3 @@
1
1
  import type { PluginStatusSnapshot } from '../server.js';
2
- import type { PreferenceScope, PublishedSkillSummary, SkillDialogRow, SkillRowState } from './types.js';
3
- export declare const getSkillDisplayName: (skill: PublishedSkillSummary) => string;
4
- export declare const getSkillDescription: (skill: PublishedSkillSummary) => string | null;
5
- export declare const getSkillTags: (skill: PublishedSkillSummary) => string;
6
- export declare const isUserScopeAssignment: (assignmentSource: string) => boolean;
7
- export declare const getSkillScopeLabel: (skill: PublishedSkillSummary, state: SkillRowState) => string;
8
- export declare const getSkillPreferenceScope: (skill: PublishedSkillSummary) => PreferenceScope;
9
- export declare const getSkillMeta: (skill: PublishedSkillSummary, state: SkillRowState) => string;
10
- export declare const getRowStateLabel: (row: SkillDialogRow) => string;
11
- export declare const getSkillRowState: (skill: PublishedSkillSummary) => SkillRowState;
2
+ import type { PublishedSkillSummary } from './types.js';
12
3
  export declare const getInstallableNotInstalledSkills: (snapshot: PluginStatusSnapshot) => PublishedSkillSummary[];
13
- export declare const getErrorMessage: (error: unknown) => string;
@@ -1,41 +1,3 @@
1
- import { WIZARD_SCOPE_LABELS, isUserPublishedSkillAssignment } from '../published-skills-terminology.js';
2
- import { MAX_SKILL_TAGS } from './constants.js';
3
- export const getSkillDisplayName = skill => skill.artifactName || skill.skillName || skill.skillSlug;
4
- export const getSkillDescription = skill => {
5
- if (skill.whenToUse) return skill.whenToUse;
6
- if (skill.artifactDescription) return skill.artifactDescription;
7
- return null;
8
- };
9
- export const getSkillTags = skill => {
10
- const tagLabels = skill.tags.map(tag => tag.label || tag.slug).filter(Boolean).slice(0, MAX_SKILL_TAGS);
11
- if (tagLabels.length === 0) return 'no tags';
12
- return tagLabels.join(', ');
13
- };
14
- export const isUserScopeAssignment = assignmentSource => isUserPublishedSkillAssignment(assignmentSource);
15
- export const getSkillScopeLabel = (skill, state) => {
16
- if (state === 'installable') return WIZARD_SCOPE_LABELS.available;
17
- if (isUserScopeAssignment(skill.assignmentSource) || state === 'user-scope') return WIZARD_SCOPE_LABELS.user;
18
- if (state === 'global-scope' || skill.contextKind === 'global') return WIZARD_SCOPE_LABELS.global;
19
- return WIZARD_SCOPE_LABELS.project;
20
- };
21
- export const getSkillPreferenceScope = skill => {
22
- if (skill.assignmentSource === 'USER_GLOBAL') return 'global';
23
- if (skill.assignmentSource === 'USER_WORKSPACE') return 'project';
24
- if (skill.contextKind === 'global') return 'global';
25
- return 'project';
26
- };
27
- export const getSkillMeta = (skill, state) => `${getSkillScopeLabel(skill, state)} · ${skill.assignmentLabel} · ${skill.policyLabel} · ${getSkillTags(skill)}`;
28
- export const getRowStateLabel = row => {
29
- const scopeLabel = getSkillScopeLabel(row.skill, row.state);
30
- if (row.ignored) return `ignored · ${scopeLabel}`;
31
- if (row.state === 'installable') return 'wizard not installed';
32
- return `active · ${scopeLabel}`;
33
- };
34
- export const getSkillRowState = skill => {
35
- if (isUserScopeAssignment(skill.assignmentSource)) return 'user-scope';
36
- if (skill.contextKind === 'global') return 'global-scope';
37
- return 'project-scope';
38
- };
39
1
  export const getInstallableNotInstalledSkills = snapshot => {
40
2
  const installableSkills = snapshot.installableCatalog?.skills ?? [];
41
3
  if (installableSkills.length === 0) return [];
@@ -43,8 +5,4 @@ export const getInstallableNotInstalledSkills = snapshot => {
43
5
  const ignoredSkillSlugs = new Set(snapshot.ignoredPublishedSkills.skills.map(skill => skill.skillSlug));
44
6
  return installableSkills.filter(skill => !activeSkillSlugs.has(skill.skillSlug) && !ignoredSkillSlugs.has(skill.skillSlug));
45
7
  };
46
- export const getErrorMessage = error => {
47
- if (error instanceof Error && error.message) return error.message;
48
- return 'Preference update failed. Check plugin auth/backend status and try again.';
49
- };
50
8
  //# sourceMappingURL=skill-helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["WIZARD_SCOPE_LABELS","isUserPublishedSkillAssignment","MAX_SKILL_TAGS","getSkillDisplayName","skill","artifactName","skillName","skillSlug","getSkillDescription","whenToUse","artifactDescription","getSkillTags","tagLabels","tags","map","tag","label","slug","filter","Boolean","slice","length","join","isUserScopeAssignment","assignmentSource","getSkillScopeLabel","state","available","user","contextKind","global","project","getSkillPreferenceScope","getSkillMeta","assignmentLabel","policyLabel","getRowStateLabel","row","scopeLabel","ignored","getSkillRowState","getInstallableNotInstalledSkills","snapshot","installableSkills","installableCatalog","skills","activeSkillSlugs","Set","catalog","ignoredSkillSlugs","ignoredPublishedSkills","has","getErrorMessage","error","Error","message"],"sources":["../../src/tui/skill-helpers.ts"],"sourcesContent":["import type { PluginStatusSnapshot } from '../server.js';\nimport { WIZARD_SCOPE_LABELS, isUserPublishedSkillAssignment } from '../published-skills-terminology.js';\nimport { MAX_SKILL_TAGS } from './constants.js';\nimport type { PreferenceScope, PublishedSkillSummary, SkillDialogRow, SkillRowState } from './types.js';\n\nexport const getSkillDisplayName = (skill: PublishedSkillSummary): string =>\n skill.artifactName || skill.skillName || skill.skillSlug;\n\nexport const getSkillDescription = (skill: PublishedSkillSummary): string | null => {\n if (skill.whenToUse) return skill.whenToUse;\n if (skill.artifactDescription) return skill.artifactDescription;\n\n return null;\n};\n\nexport const getSkillTags = (skill: PublishedSkillSummary): string => {\n const tagLabels = skill.tags.map((tag) => tag.label || tag.slug).filter(Boolean).slice(0, MAX_SKILL_TAGS);\n if (tagLabels.length === 0) return 'no tags';\n\n return tagLabels.join(', ');\n};\n\nexport const isUserScopeAssignment = (assignmentSource: string): boolean =>\n isUserPublishedSkillAssignment(assignmentSource);\n\nexport const getSkillScopeLabel = (skill: PublishedSkillSummary, state: SkillRowState): string => {\n if (state === 'installable') return WIZARD_SCOPE_LABELS.available;\n if (isUserScopeAssignment(skill.assignmentSource) || state === 'user-scope') return WIZARD_SCOPE_LABELS.user;\n if (state === 'global-scope' || skill.contextKind === 'global') return WIZARD_SCOPE_LABELS.global;\n\n return WIZARD_SCOPE_LABELS.project;\n};\n\nexport const getSkillPreferenceScope = (skill: PublishedSkillSummary): PreferenceScope => {\n if (skill.assignmentSource === 'USER_GLOBAL') return 'global';\n if (skill.assignmentSource === 'USER_WORKSPACE') return 'project';\n if (skill.contextKind === 'global') return 'global';\n\n return 'project';\n};\n\nexport const getSkillMeta = (skill: PublishedSkillSummary, state: SkillRowState): string =>\n `${getSkillScopeLabel(skill, state)} · ${skill.assignmentLabel} · ${skill.policyLabel} · ${getSkillTags(skill)}`;\n\nexport const getRowStateLabel = (row: SkillDialogRow): string => {\n const scopeLabel = getSkillScopeLabel(row.skill, row.state);\n if (row.ignored) return `ignored · ${scopeLabel}`;\n if (row.state === 'installable') return 'wizard not installed';\n\n return `active · ${scopeLabel}`;\n};\n\nexport const getSkillRowState = (skill: PublishedSkillSummary): SkillRowState => {\n if (isUserScopeAssignment(skill.assignmentSource)) return 'user-scope';\n if (skill.contextKind === 'global') return 'global-scope';\n\n return 'project-scope';\n};\n\nexport const getInstallableNotInstalledSkills = (snapshot: PluginStatusSnapshot): PublishedSkillSummary[] => {\n const installableSkills = snapshot.installableCatalog?.skills ?? [];\n if (installableSkills.length === 0) return [];\n\n const activeSkillSlugs = new Set(snapshot.catalog?.skills.map((skill) => skill.skillSlug) ?? []);\n const ignoredSkillSlugs = new Set(snapshot.ignoredPublishedSkills.skills.map((skill) => skill.skillSlug));\n\n return installableSkills.filter(\n (skill) => !activeSkillSlugs.has(skill.skillSlug) && !ignoredSkillSlugs.has(skill.skillSlug),\n );\n};\n\nexport const getErrorMessage = (error: unknown): string => {\n if (error instanceof Error && error.message) return error.message;\n\n return 'Preference update failed. Check plugin auth/backend status and try again.';\n};\n"],"mappings":"AACA,SAASA,mBAAmB,EAAEC,8BAA8B,QAAQ,oCAAoC;AACxG,SAASC,cAAc,QAAQ,gBAAgB;AAG/C,OAAO,MAAMC,mBAAmB,GAAIC,KAA4B,IAC9DA,KAAK,CAACC,YAAY,IAAID,KAAK,CAACE,SAAS,IAAIF,KAAK,CAACG,SAAS;AAE1D,OAAO,MAAMC,mBAAmB,GAAIJ,KAA4B,IAAoB;EAClF,IAAIA,KAAK,CAACK,SAAS,EAAE,OAAOL,KAAK,CAACK,SAAS;EAC3C,IAAIL,KAAK,CAACM,mBAAmB,EAAE,OAAON,KAAK,CAACM,mBAAmB;EAE/D,OAAO,IAAI;AACb,CAAC;AAED,OAAO,MAAMC,YAAY,GAAIP,KAA4B,IAAa;EACpE,MAAMQ,SAAS,GAAGR,KAAK,CAACS,IAAI,CAACC,GAAG,CAAEC,GAAG,IAAKA,GAAG,CAACC,KAAK,IAAID,GAAG,CAACE,IAAI,CAAC,CAACC,MAAM,CAACC,OAAO,CAAC,CAACC,KAAK,CAAC,CAAC,EAAElB,cAAc,CAAC;EACzG,IAAIU,SAAS,CAACS,MAAM,KAAK,CAAC,EAAE,OAAO,SAAS;EAE5C,OAAOT,SAAS,CAACU,IAAI,CAAC,IAAI,CAAC;AAC7B,CAAC;AAED,OAAO,MAAMC,qBAAqB,GAAIC,gBAAwB,IAC5DvB,8BAA8B,CAACuB,gBAAgB,CAAC;AAElD,OAAO,MAAMC,kBAAkB,GAAGA,CAACrB,KAA4B,EAAEsB,KAAoB,KAAa;EAChG,IAAIA,KAAK,KAAK,aAAa,EAAE,OAAO1B,mBAAmB,CAAC2B,SAAS;EACjE,IAAIJ,qBAAqB,CAACnB,KAAK,CAACoB,gBAAgB,C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zD,OAAO,eAAe;AACxB,CAAC;AAED,OAAO,MAAMY,gCAAgC,GAAIC,QAA8B,IAA8B;EAC3G,MAAMC,iBAAiB,GAAGD,QAAQ,CAACE,kBAAkB,EAAEC,MAAM,IAAI,EAAE;EACnE,IAAIF,iBAAiB,CAACtB,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE;EAE7C,MAAMyB,gBAAgB,GAAG,IAAIC,GAAG,CAACL,QAAQ,CAACM,OAAO,EAAEH,MAAM,CAAC/B,GAAG,CAAEV,KAAK,IAAKA,KAAK,CAACG,SAAS,CAAC,IAAI,EAAE,CAAC;EAChG,MAAM0C,iBAAiB,GAAG,IAAIF,GAAG,CAACL,QAAQ,CAACQ,sBAAsB,CAACL,MAAM,CAAC/B,GAAG,CAAEV,KAAK,IAAKA,KAAK,CAACG,SAAS,CAAC,CAAC;EAEzG,OAAOoC,iBAAiB,CAACzB,MAAM,CAC5Bd,KAAK,IAAK,CAAC0C,gBAAgB,CAACK,GAAG,CAAC/C,KAAK,CAACG,SAAS,CAAC,IAAI,CAAC0C,iBAAiB,CAACE,GAAG,CAAC/C,KAAK,CAACG,SAAS,CAC7F,CAAC;AACH,CAAC;AAED,OAAO,MAAM6C,eAAe,GAAIC,KAAc,IAAa;EACzD,IAAIA,KAAK,YAAYC,KAAK,IAAID,KAAK,CAACE,OAAO,EAAE,OAAOF,KAAK,CAACE,OAAO;EAEjE,OAAO,2EAA2E;AACpF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["getInstallableNotInstalledSkills","snapshot","installableSkills","installableCatalog","skills","length","activeSkillSlugs","Set","catalog","map","skill","skillSlug","ignoredSkillSlugs","ignoredPublishedSkills","filter","has"],"sources":["../../src/tui/skill-helpers.ts"],"sourcesContent":["import type { PluginStatusSnapshot } from '../server.js';\nimport type { PublishedSkillSummary } from './types.js';\n\nexport const getInstallableNotInstalledSkills = (snapshot: PluginStatusSnapshot): PublishedSkillSummary[] => {\n const installableSkills = snapshot.installableCatalog?.skills ?? [];\n if (installableSkills.length === 0) return [];\n\n const activeSkillSlugs = new Set(snapshot.catalog?.skills.map((skill) => skill.skillSlug) ?? []);\n const ignoredSkillSlugs = new Set(snapshot.ignoredPublishedSkills.skills.map((skill) => skill.skillSlug));\n\n return installableSkills.filter(\n (skill) => !activeSkillSlugs.has(skill.skillSlug) && !ignoredSkillSlugs.has(skill.skillSlug),\n );\n};\n"],"mappings":"AAGA,OAAO,MAAMA,gCAAgC,GAAIC,QAA8B,IAA8B;EAC3G,MAAMC,iBAAiB,GAAGD,QAAQ,CAACE,kBAAkB,EAAEC,MAAM,IAAI,EAAE;EACnE,IAAIF,iBAAiB,CAACG,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE;EAE7C,MAAMC,gBAAgB,GAAG,IAAIC,GAAG,CAACN,QAAQ,CAACO,OAAO,EAAEJ,MAAM,CAACK,GAAG,CAAEC,KAAK,IAAKA,KAAK,CAACC,SAAS,CAAC,IAAI,EAAE,CAAC;EAChG,MAAMC,iBAAiB,GAAG,IAAIL,GAAG,CAACN,QAAQ,CAACY,sBAAsB,CAACT,MAAM,CAACK,GAAG,CAAEC,KAAK,IAAKA,KAAK,CAACC,SAAS,CAAC,CAAC;EAEzG,OAAOT,iBAAiB,CAACY,MAAM,CAC5BJ,KAAK,IAAK,CAACJ,gBAAgB,CAACS,GAAG,CAACL,KAAK,CAACC,SAAS,CAAC,IAAI,CAACC,iBAAiB,CAACG,GAAG,CAACL,KAAK,CAACC,SAAS,CAC7F,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
1
  import type { RefreshStatus, StatusState, TuiPluginApi, TuiSlotPlugin } from './types.js';
2
- export declare const createWizardStatusSlot: (api: TuiPluginApi, status: () => StatusState, refreshStatus: RefreshStatus) => TuiSlotPlugin;
2
+ export declare const createWizardStatusSlot: (api: TuiPluginApi, status: () => StatusState, _refreshStatus: RefreshStatus) => TuiSlotPlugin;
package/dist/tui/slots.js CHANGED
@@ -1,28 +1,7 @@
1
1
  import { createComponent as _$createComponent } from "@opentui/solid";
2
- import { requestRender } from './rendering.js';
3
2
  import { Panel } from './components/common.js';
4
3
  import { SkillsRows } from './components/status-content.js';
5
- import { WizardSkillsDialog } from './components/wizard-skills-dialog.js';
6
- const openWizardSkillsDialog = (api, status, refreshStatus) => {
7
- const dialog = api.ui?.dialog;
8
- if (!dialog?.replace) return;
9
- refreshStatus({
10
- showLoading: true
11
- });
12
- dialog.replace(() => _$createComponent(WizardSkillsDialog, {
13
- api: api,
14
- status: status,
15
- refreshStatus: refreshStatus,
16
- onClose: () => {
17
- dialog.clear?.();
18
- requestRender(api);
19
- }
20
- }), () => {
21
- requestRender(api);
22
- });
23
- requestRender(api);
24
- };
25
- export const createWizardStatusSlot = (api, status, refreshStatus) => ({
4
+ export const createWizardStatusSlot = (api, status, _refreshStatus) => ({
26
5
  order: 240,
27
6
  slots: {
28
7
  home_bottom: () => _$createComponent(Panel, {
@@ -30,7 +9,6 @@ export const createWizardStatusSlot = (api, status, refreshStatus) => ({
30
9
  get theme() {
31
10
  return api.theme.current;
32
11
  },
33
- onOpen: () => openWizardSkillsDialog(api, status, refreshStatus),
34
12
  get children() {
35
13
  return _$createComponent(SkillsRows, {
36
14
  api: api,
@@ -43,7 +21,6 @@ export const createWizardStatusSlot = (api, status, refreshStatus) => ({
43
21
  get theme() {
44
22
  return api.theme.current;
45
23
  },
46
- onOpen: () => openWizardSkillsDialog(api, status, refreshStatus),
47
24
  get children() {
48
25
  return _$createComponent(SkillsRows, {
49
26
  api: api,
@@ -1 +1 @@
1
- {"version":3,"names":["requestRender","Panel","SkillsRows","WizardSkillsDialog","openWizardSkillsDialog","api","status","refreshStatus","dialog","ui","replace","showLoading","_$createComponent","onClose","clear","createWizardStatusSlot","order","slots","home_bottom","title","theme","current","onOpen","children","sidebar_content","_ctx","_value"],"sources":["../../src/tui/slots.tsx"],"sourcesContent":["import { requestRender } from './rendering.js';\nimport type { RefreshStatus, StatusState, TuiPluginApi, TuiSlotContext, TuiSlotPlugin } from './types.js';\nimport { Panel } from './components/common.js';\nimport { SkillsRows } from './components/status-content.js';\nimport { WizardSkillsDialog } from './components/wizard-skills-dialog.js';\n\nconst openWizardSkillsDialog = (api: TuiPluginApi, status: () => StatusState, refreshStatus: RefreshStatus): void => {\n const dialog = api.ui?.dialog;\n if (!dialog?.replace) return;\n\n refreshStatus({ showLoading: true });\n\n dialog.replace(\n () => (\n <WizardSkillsDialog\n api={api}\n status={status}\n refreshStatus={refreshStatus}\n onClose={() => {\n dialog.clear?.();\n requestRender(api);\n }}\n />\n ),\n () => {\n requestRender(api);\n },\n );\n\n requestRender(api);\n};\n\nexport const createWizardStatusSlot = (\n api: TuiPluginApi,\n status: () => StatusState,\n refreshStatus: RefreshStatus,\n): TuiSlotPlugin => ({\n order: 240,\n slots: {\n home_bottom: () => (\n <Panel title=\"Wizard Skills\" theme={api.theme.current} onOpen={() => openWizardSkillsDialog(api, status, refreshStatus)}>\n <SkillsRows api={api} status={status} />\n </Panel>\n ),\n sidebar_content: (_ctx: TuiSlotContext, _value: { session_id: string }) => (\n <Panel title=\"Wizard Skills\" theme={api.theme.current} onOpen={() => openWizardSkillsDialog(api, status, refreshStatus)}>\n <SkillsRows api={api} status={status} />\n </Panel>\n ),\n },\n});\n"],"mappings":";AAAA,SAASA,aAAa,QAAQ,gBAAgB;AAE9C,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,UAAU,QAAQ,gCAAgC;AAC3D,SAASC,kBAAkB,QAAQ,sCAAsC;AAEzE,MAAMC,sBAAsB,GAAGA,CAACC,GAAiB,EAAEC,MAAyB,EAAEC,aAA4B,KAAW;EACnH,MAAMC,MAAM,GAAGH,GAAG,CAACI,EAAE,EAAED,MAAM;EAC7B,IAAI,CAACA,MAAM,EAAEE,OAAO,EAAE;EAEtBH,aAAa,CAAC;IAAEI,WAAW,EAAE;EAAK,CAAC,CAAC;EAEpCH,MAAM,CAACE,OAAO,CACZ,MAAAE,iBAAA,CACGT,kBAAkB;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status","_refreshStatus","order","slots","home_bottom","_$createComponent","title","theme","current","children","sidebar_content","_ctx","_value"],"sources":["../../src/tui/slots.tsx"],"sourcesContent":["import type { RefreshStatus, StatusState, TuiPluginApi, TuiSlotContext, TuiSlotPlugin } from './types.js';\nimport { Panel } from './components/common.js';\nimport { SkillsRows } from './components/status-content.js';\n\nexport const createWizardStatusSlot = (\n api: TuiPluginApi,\n status: () => StatusState,\n _refreshStatus: RefreshStatus,\n): TuiSlotPlugin => ({\n order: 240,\n slots: {\n home_bottom: () => (\n <Panel title=\"Wizard Skills\" theme={api.theme.current}>\n <SkillsRows api={api} status={status} />\n </Panel>\n ),\n sidebar_content: (_ctx: TuiSlotContext, _value: { session_id: string }) => (\n <Panel title=\"Wizard Skills\" theme={api.theme.current}>\n <SkillsRows api={api} status={status} />\n </Panel>\n ),\n },\n});\n"],"mappings":";AACA,SAASA,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,UAAU,QAAQ,gCAAgC;AAE3D,OAAO,MAAMC,sBAAsB,GAAGA,CACpCC,GAAiB,EACjBC,MAAyB,EACzBC,cAA6B,MACV;EACnBC,KAAK,EAAE,GAAG;EACVC,KAAK,EAAE;IACLC,WAAW,EAAEA,CAAA,KAAAC,iBAAA,CACVT,KAAK;MAACU,KAAK;MAAA,IAAiBC,KAAKA,CAAA;QAAA,OAAER,GAAG,CAACQ,KAAK,CAACC,OAAO;MAAA;MAAA,IAAAC,SAAA;QAAA,OAAAJ,iBAAA,CAClDR,UAAU;UAACE,GAAG,EAAEA,GAAG;UAAEC,MAAM,EAAEA;QAAM;MAAA;IAAA,EAEvC;IACDU,eAAe,EAAEA,CAACC,IAAoB,EAAEC,MAA8B,KAAAP,iBAAA,CACnET,KAAK;MAACU,KAAK;MAAA,IAAiBC,KAAKA,CAAA;QAAA,OAAER,GAAG,CAACQ,KAAK,CAACC,OAAO;MAAA;MAAA,IAAAC,SAAA;QAAA,OAAAJ,iBAAA,CAClDR,UAAU;UAACE,GAAG,EAAEA,GAAG;UAAEC,MAAM,EAAEA;QAAM;MAAA;IAAA;EAG1C;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,8 +1,8 @@
1
- import { resolvePluginStatusSnapshotWithAuthBootstrap } from '../server.js';
1
+ import { resolvePluginStatusSnapshot } from '../server.js';
2
2
  import { STATUS_TIMEOUT_MS } from './constants.js';
3
3
  export const loadStatus = async api => {
4
4
  try {
5
- const snapshot = await resolvePluginStatusSnapshotWithAuthBootstrap({
5
+ const snapshot = await resolvePluginStatusSnapshot({
6
6
  worktree: api.state.path.worktree,
7
7
  directory: api.state.path.directory,
8
8
  signal: AbortSignal.timeout(STATUS_TIMEOUT_MS)
@@ -1 +1 @@
1
- {"version":3,"names":["resolvePluginStatusSnapshotWithAuthBootstrap","STATUS_TIMEOUT_MS","loadStatus","api","snapshot","worktree","state","path","directory","signal","AbortSignal","timeout","kind","error","message","Error"],"sources":["../../src/tui/status.ts"],"sourcesContent":["import { resolvePluginStatusSnapshotWithAuthBootstrap } from '../server.js';\nimport { STATUS_TIMEOUT_MS } from './constants.js';\nimport type { StatusState, TuiPluginApi } from './types.js';\n\nexport const loadStatus = async (api: TuiPluginApi): Promise<StatusState> => {\n try {\n const snapshot = await resolvePluginStatusSnapshotWithAuthBootstrap({\n worktree: api.state.path.worktree,\n directory: api.state.path.directory,\n signal: AbortSignal.timeout(STATUS_TIMEOUT_MS),\n });\n\n return {\n kind: 'ready',\n snapshot,\n };\n } catch (error) {\n return {\n kind: 'error',\n message: error instanceof Error ? error.message : 'Unable to load opencode-wizard status.',\n };\n }\n};\n"],"mappings":"AAAA,SAASA,4CAA4C,QAAQ,cAAc;AAC3E,SAASC,iBAAiB,QAAQ,gBAAgB;AAGlD,OAAO,MAAMC,UAAU,GAAG,MAAOC,GAAiB,IAA2B;EAC3E,IAAI;IACF,MAAMC,QAAQ,GAAG,MAAMJ,4CAA4C,CAAC;MAClEK,QAAQ,EAAEF,GAAG,CAACG,KAAK,CAACC,IAAI,CAACF,QAAQ;MACjCG,SAAS,EAAEL,GAAG,CAACG,KAAK,CAACC,IAAI,CAACC,SAAS;MACnCC,MAAM,EAAEC,WAAW,CAACC,OAAO,CAACV,iBAAiB;IAC/C,CAAC,CAAC;IAEF,OAAO;MACLW,IAAI,EAAE,OAAO;MACbR;IACF,CAAC;EACH,CAAC,CAAC,OAAOS,KAAK,EAAE;IACd,OAAO;MACLD,IAAI,EAAE,OAAO;MACbE,OAAO,EAAED,KAAK,YAAYE,KAAK,GAAGF,KAAK,CAACC,OAAO,GAAG;IACpD,CAAC;EACH;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["resolvePluginStatusSnapshot","STATUS_TIMEOUT_MS","loadStatus","api","snapshot","worktree","state","path","directory","signal","AbortSignal","timeout","kind","error","message","Error"],"sources":["../../src/tui/status.ts"],"sourcesContent":["import { resolvePluginStatusSnapshot } from '../server.js';\nimport { STATUS_TIMEOUT_MS } from './constants.js';\nimport type { StatusState, TuiPluginApi } from './types.js';\n\nexport const loadStatus = async (api: TuiPluginApi): Promise<StatusState> => {\n try {\n const snapshot = await resolvePluginStatusSnapshot({\n worktree: api.state.path.worktree,\n directory: api.state.path.directory,\n signal: AbortSignal.timeout(STATUS_TIMEOUT_MS),\n });\n\n return {\n kind: 'ready',\n snapshot,\n };\n } catch (error) {\n return {\n kind: 'error',\n message: error instanceof Error ? error.message : 'Unable to load opencode-wizard status.',\n };\n }\n};\n"],"mappings":"AAAA,SAASA,2BAA2B,QAAQ,cAAc;AAC1D,SAASC,iBAAiB,QAAQ,gBAAgB;AAGlD,OAAO,MAAMC,UAAU,GAAG,MAAOC,GAAiB,IAA2B;EAC3E,IAAI;IACF,MAAMC,QAAQ,GAAG,MAAMJ,2BAA2B,CAAC;MACjDK,QAAQ,EAAEF,GAAG,CAACG,KAAK,CAACC,IAAI,CAACF,QAAQ;MACjCG,SAAS,EAAEL,GAAG,CAACG,KAAK,CAACC,IAAI,CAACC,SAAS;MACnCC,MAAM,EAAEC,WAAW,CAACC,OAAO,CAACV,iBAAiB;IAC/C,CAAC,CAAC;IAEF,OAAO;MACLW,IAAI,EAAE,OAAO;MACbR;IACF,CAAC;EACH,CAAC,CAAC,OAAOS,KAAK,EAAE;IACd,OAAO;MACLD,IAAI,EAAE,OAAO;MACbE,OAAO,EAAED,KAAK,YAAYE,KAAK,GAAGF,KAAK,CAACC,OAAO,GAAG;IACpD,CAAC;EACH;AACF,CAAC","ignoreList":[]}
@@ -51,25 +51,6 @@ export type TuiSlotPlugin = {
51
51
  };
52
52
  export type TuiPlugin = (api: TuiPluginApi) => void | Promise<void>;
53
53
  export type PublishedSkillSummary = NonNullable<PluginStatusSnapshot['catalog']>['skills'][number];
54
- export type SkillRowState = 'global-scope' | 'project-scope' | 'user-scope' | 'installable';
55
- export type SkillDialogRow = {
56
- skill: PublishedSkillSummary;
57
- ignored: boolean;
58
- state: SkillRowState;
59
- };
60
54
  export type RefreshStatus = (options?: {
61
55
  showLoading?: boolean;
62
56
  }) => void;
63
- export type PreferenceScope = 'global' | 'project';
64
- export type PreferenceActionNotice = {
65
- kind: 'idle';
66
- } | {
67
- kind: 'pending';
68
- message: string;
69
- } | {
70
- kind: 'success';
71
- message: string;
72
- } | {
73
- kind: 'error';
74
- message: string;
75
- };
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../src/tui/types.ts"],"sourcesContent":["import type { RGBA } from '@opentui/core';\nimport type { JSX } from 'solid-js';\nimport type { PluginStatusSnapshot } from '../server.js';\n\nexport type StatusState =\n | {\n kind: 'loading';\n }\n | {\n kind: 'ready';\n snapshot: PluginStatusSnapshot;\n }\n | {\n kind: 'error';\n message: string;\n };\n\nexport type WizardTheme = {\n text: string | RGBA | undefined;\n textMuted: string | RGBA | undefined;\n warning: string | RGBA | undefined;\n};\n\nexport type TuiPluginApi = {\n theme: {\n current: WizardTheme;\n };\n ui?: {\n dialog?: {\n replace?: (render: () => JSX.Element, onClose?: () => void) => void;\n clear?: () => void;\n setSize?: (size: 'medium' | 'large' | 'xlarge') => void;\n };\n };\n renderer?: {\n requestRender?: () => void;\n };\n slots: {\n register: (slot: TuiSlotPlugin) => void;\n };\n state: {\n path: {\n worktree: string;\n directory: string;\n };\n };\n};\n\nexport type TuiSlotContext = unknown;\n\nexport type TuiSlotPlugin = {\n order: number;\n slots: {\n home_bottom: () => JSX.Element;\n sidebar_content: (ctx: TuiSlotContext, value: { session_id: string }) => JSX.Element;\n };\n};\n\nexport type TuiPlugin = (api: TuiPluginApi) => void | Promise<void>;\n\nexport type PublishedSkillSummary = NonNullable<PluginStatusSnapshot['catalog']>['skills'][number];\nexport type SkillRowState = 'global-scope' | 'project-scope' | 'user-scope' | 'installable';\nexport type SkillDialogRow = {\n skill: PublishedSkillSummary;\n ignored: boolean;\n state: SkillRowState;\n};\nexport type RefreshStatus = (options?: { showLoading?: boolean }) => void;\nexport type PreferenceScope = 'global' | 'project';\nexport type PreferenceActionNotice =\n | {\n kind: 'idle';\n }\n | {\n kind: 'pending';\n message: string;\n }\n | {\n kind: 'success';\n message: string;\n }\n | {\n kind: 'error';\n message: string;\n };\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../src/tui/types.ts"],"sourcesContent":["import type { RGBA } from '@opentui/core';\nimport type { JSX } from 'solid-js';\nimport type { PluginStatusSnapshot } from '../server.js';\n\nexport type StatusState =\n | {\n kind: 'loading';\n }\n | {\n kind: 'ready';\n snapshot: PluginStatusSnapshot;\n }\n | {\n kind: 'error';\n message: string;\n };\n\nexport type WizardTheme = {\n text: string | RGBA | undefined;\n textMuted: string | RGBA | undefined;\n warning: string | RGBA | undefined;\n};\n\nexport type TuiPluginApi = {\n theme: {\n current: WizardTheme;\n };\n ui?: {\n dialog?: {\n replace?: (render: () => JSX.Element, onClose?: () => void) => void;\n clear?: () => void;\n setSize?: (size: 'medium' | 'large' | 'xlarge') => void;\n };\n };\n renderer?: {\n requestRender?: () => void;\n };\n slots: {\n register: (slot: TuiSlotPlugin) => void;\n };\n state: {\n path: {\n worktree: string;\n directory: string;\n };\n };\n};\n\nexport type TuiSlotContext = unknown;\n\nexport type TuiSlotPlugin = {\n order: number;\n slots: {\n home_bottom: () => JSX.Element;\n sidebar_content: (ctx: TuiSlotContext, value: { session_id: string }) => JSX.Element;\n };\n};\n\nexport type TuiPlugin = (api: TuiPluginApi) => void | Promise<void>;\n\nexport type PublishedSkillSummary = NonNullable<PluginStatusSnapshot['catalog']>['skills'][number];\nexport type RefreshStatus = (options?: { showLoading?: boolean }) => void;\n"],"mappings":"","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aexol/opencode-wizard",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "OpenCode plugin for opencode-wizard published skills",
5
5
  "type": "module",
6
6
  "oc-plugin": [
@@ -1,5 +0,0 @@
1
- import type { PreferenceActionNotice, TuiPluginApi } from '../types.js';
2
- export declare const PreferenceActionNoticeRow: (props: {
3
- notice: PreferenceActionNotice;
4
- theme: TuiPluginApi["theme"]["current"];
5
- }) => any;
@@ -1,17 +0,0 @@
1
- import { effect as _$effect } from "@opentui/solid";
2
- import { insert as _$insert } from "@opentui/solid";
3
- import { setProp as _$setProp } from "@opentui/solid";
4
- import { createElement as _$createElement } from "@opentui/solid";
5
- import { compactStatusMessage } from '../formatting.js';
6
- export const PreferenceActionNoticeRow = props => {
7
- if (props.notice.kind === 'idle') return null;
8
- return (() => {
9
- var _el$ = _$createElement("text");
10
- _$setProp(_el$, "wrapMode", "none");
11
- _$setProp(_el$, "overflow", "hidden");
12
- _$insert(_el$, () => compactStatusMessage(props.notice.message));
13
- _$effect(_$p => _$setProp(_el$, "fg", props.notice.kind === 'error' ? props.theme.warning : props.theme.textMuted, _$p));
14
- return _el$;
15
- })();
16
- };
17
- //# sourceMappingURL=preference-action-notice-row.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["compactStatusMessage","PreferenceActionNoticeRow","props","notice","kind","_el$","_$createElement","_$setProp","_$insert","message","_$effect","_$p","theme","warning","textMuted"],"sources":["../../../src/tui/components/preference-action-notice-row.tsx"],"sourcesContent":["import { compactStatusMessage } from '../formatting.js';\nimport type { PreferenceActionNotice, TuiPluginApi } from '../types.js';\n\nexport const PreferenceActionNoticeRow = (props: {\n notice: PreferenceActionNotice;\n theme: TuiPluginApi['theme']['current'];\n}) => {\n if (props.notice.kind === 'idle') return null;\n\n return (\n <text\n fg={props.notice.kind === 'error' ? props.theme.warning : props.theme.textMuted}\n wrapMode=\"none\"\n overflow=\"hidden\"\n >\n {compactStatusMessage(props.notice.message)}\n </text>\n );\n};\n"],"mappings":";;;;AAAA,SAASA,oBAAoB,QAAQ,kBAAkB;AAGvD,OAAO,MAAMC,yBAAyB,GAAIC,KAGzC,IAAK;EACJ,IAAIA,KAAK,CAACC,MAAM,CAACC,IAAI,KAAK,MAAM,EAAE,OAAO,IAAI;EAE7C;IAAA,IAAAC,IAAA,GAAAC,eAAA;IAAAC,SAAA,CAAAF,IAAA,cAGa,MAAM;IAAAE,SAAA,CAAAF,IAAA,cACN,QAAQ;IAAAG,QAAA,CAAAH,IAAA,QAEhBL,oBAAoB,CAACE,KAAK,CAACC,MAAM,CAACM,OAAO,CAAC;IAAAC,QAAA,CAAAC,GAAA,IAAAJ,SAAA,CAAAF,IAAA,QAJvCH,KAAK,CAACC,MAAM,CAACC,IAAI,KAAK,OAAO,GAAGF,KAAK,CAACU,KAAK,CAACC,OAAO,GAAGX,KAAK,CAACU,KAAK,CAACE,SAAS,EAAAH,GAAA;IAAA,OAAAN,IAAA;EAAA;AAOrF,CAAC","ignoreList":[]}
@@ -1,8 +0,0 @@
1
- import type { PreferenceScope, SkillDialogRow, TuiPluginApi } from '../types.js';
2
- export declare const SkillCatalogRow: (props: {
3
- row: SkillDialogRow;
4
- theme: TuiPluginApi["theme"]["current"];
5
- onIgnore: (row: SkillDialogRow) => void;
6
- onInstall: (row: SkillDialogRow, preferenceScope: PreferenceScope) => void;
7
- onUninstall: (row: SkillDialogRow) => void;
8
- }) => any;