@aexol/opencode-wizard 0.4.0 → 0.4.1

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.
@@ -101,6 +101,44 @@ export type CreateOrUpdateSkillFromMarkdownResponse = {
101
101
  };
102
102
  };
103
103
  };
104
+ export type EditorSkillWorkspaceAssignmentLookupResponse = {
105
+ admin: {
106
+ skill: {
107
+ id: string;
108
+ slug: string;
109
+ } | null;
110
+ workspace: {
111
+ id: string;
112
+ slug: string;
113
+ } | null;
114
+ };
115
+ };
116
+ export type BulkCreateSkillAssignmentsResponse = {
117
+ admin: {
118
+ bulkCreateSkillAssignments: {
119
+ scopePathAssignments: Array<{
120
+ id: string;
121
+ }>;
122
+ skippedScopePathAssignments: Array<{
123
+ id: string;
124
+ }>;
125
+ conflicts: Array<{
126
+ target: string;
127
+ inputIndex: number;
128
+ reason: string;
129
+ message: string;
130
+ }>;
131
+ };
132
+ };
133
+ };
134
+ export type EditorSkillWorkspaceAssignmentResult = {
135
+ status: 'created' | 'already_exists' | 'skipped' | 'failed';
136
+ workspaceSlug?: string | null;
137
+ workspaceId?: string | null;
138
+ directoryPath: string;
139
+ assignmentId?: string | null;
140
+ message?: string | null;
141
+ };
104
142
  export type ImportWizardArtifactSnapshotResponse = {
105
143
  importWizardArtifactSnapshot: {
106
144
  success: boolean;
@@ -231,6 +269,10 @@ export type WizardArtifactDetailPayload = WizardArtifactCatalogItem['artifactVer
231
269
  export type PublishedSkillArtifactDetailPurpose = 'TOOL_FETCH';
232
270
  export type GraphQLErrorItem = {
233
271
  message: string;
272
+ path?: Array<string | number>;
273
+ extensions?: {
274
+ code?: string;
275
+ } & Record<string, unknown>;
234
276
  };
235
277
  export type GraphQLResponse<TData> = {
236
278
  data?: TData;
@@ -285,6 +327,7 @@ export type FetchResult = {
285
327
  status: 'missing_auth' | 'request_failed';
286
328
  authMode: 'missing' | 'session';
287
329
  message: string;
330
+ graphQlErrors?: string[];
288
331
  fetchedAt: string;
289
332
  source: 'network' | 'cache';
290
333
  };
@@ -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 RecommendationMetadata = {\n relevance?: number | null;\n recommendationReason?: string | null;\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 admin: {\n createOrUpdateSkillFromMarkdown: {\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};\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 = RecommendationMetadata &\n Pick<PublishedSkillCatalogItem, 'skill' | 'skillVersion' | 'publishedArtifact'>;\n\nexport type PublishedSkillCatalogItem = RecommendationMetadata & {\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 revision?: string | null;\n updatedAtCursor?: string | null;\n publishedAt?: string | null;\n fileCount: number;\n };\n};\n\nexport type WizardArtifactInstallableCatalogItem = RecommendationMetadata &\n Pick<WizardArtifactCatalogItem, 'artifact' | 'artifactVersion'>;\n\nexport type WizardArtifactCatalogItem = RecommendationMetadata & {\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 revision?: string | null;\n updatedAtCursor?: string | null;\n canonicalFilePath: string;\n publishedAt?: string | null;\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 CurrentUserRoleResponse = {\n user?: {\n me?: {\n _id: string;\n email: string;\n role: 'ADMIN' | 'EDITOR';\n } | null;\n } | 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 cursor: string;\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 revision: string;\n};\n\nexport type WizardArtifactDetailCacheEntry = {\n artifact: WizardArtifactDetailPayload;\n expiresAt: number;\n revision: string;\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 globalSkillManagementHint: 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 RecommendationMetadata = {\n relevance?: number | null;\n recommendationReason?: string | null;\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 admin: {\n createOrUpdateSkillFromMarkdown: {\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};\n\nexport type EditorSkillWorkspaceAssignmentLookupResponse = {\n admin: {\n skill: { id: string; slug: string } | null;\n workspace: { id: string; slug: string } | null;\n };\n};\n\nexport type BulkCreateSkillAssignmentsResponse = {\n admin: {\n bulkCreateSkillAssignments: {\n scopePathAssignments: Array<{ id: string }>;\n skippedScopePathAssignments: Array<{ id: string }>;\n conflicts: Array<{\n target: string;\n inputIndex: number;\n reason: string;\n message: string;\n }>;\n };\n };\n};\n\nexport type EditorSkillWorkspaceAssignmentResult = {\n status: 'created' | 'already_exists' | 'skipped' | 'failed';\n workspaceSlug?: string | null;\n workspaceId?: string | null;\n directoryPath: string;\n assignmentId?: string | null;\n message?: string | null;\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 = RecommendationMetadata &\n Pick<PublishedSkillCatalogItem, 'skill' | 'skillVersion' | 'publishedArtifact'>;\n\nexport type PublishedSkillCatalogItem = RecommendationMetadata & {\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 revision?: string | null;\n updatedAtCursor?: string | null;\n publishedAt?: string | null;\n fileCount: number;\n };\n};\n\nexport type WizardArtifactInstallableCatalogItem = RecommendationMetadata &\n Pick<WizardArtifactCatalogItem, 'artifact' | 'artifactVersion'>;\n\nexport type WizardArtifactCatalogItem = RecommendationMetadata & {\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 revision?: string | null;\n updatedAtCursor?: string | null;\n canonicalFilePath: string;\n publishedAt?: string | null;\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 path?: Array<string | number>;\n extensions?: {\n code?: string;\n } & Record<string, unknown>;\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 CurrentUserRoleResponse = {\n user?: {\n me?: {\n _id: string;\n email: string;\n role: 'ADMIN' | 'EDITOR';\n } | null;\n } | 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 graphQlErrors?: string[];\n fetchedAt: string;\n source: 'network' | 'cache';\n };\n\nexport type CacheEntry = {\n result: FetchResult;\n expiresAt: number;\n cursor: string;\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 revision: string;\n};\n\nexport type WizardArtifactDetailCacheEntry = {\n artifact: WizardArtifactDetailPayload;\n expiresAt: number;\n revision: string;\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 globalSkillManagementHint: 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aexol/opencode-wizard",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "OpenCode plugin for opencode-wizard published skills",
5
5
  "type": "module",
6
6
  "oc-plugin": [