@aexol/opencode-wizard 0.4.0 → 0.4.2
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.
- package/dist/graphql-operations.d.ts +3 -1
- package/dist/graphql-operations.js +43 -7
- package/dist/graphql-operations.js.map +1 -1
- package/dist/plugin-tools.d.ts +1 -0
- package/dist/plugin-tools.js +5 -4
- package/dist/plugin-tools.js.map +1 -1
- package/dist/server/client.d.ts +2 -1
- package/dist/server/client.js +31 -14
- package/dist/server/client.js.map +1 -1
- package/dist/server/runtime.js +152 -12
- package/dist/server/runtime.js.map +1 -1
- package/dist/server/types.d.ts +52 -7
- package/dist/server/types.js.map +1 -1
- package/package.json +1 -1
package/dist/server/types.d.ts
CHANGED
|
@@ -101,14 +101,54 @@ 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
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
143
|
+
admin: {
|
|
144
|
+
importWizardArtifactSnapshot: {
|
|
145
|
+
success: boolean;
|
|
146
|
+
skillSlug: string | null;
|
|
147
|
+
skillVersionId: string | null;
|
|
148
|
+
artifactSlug: string | null;
|
|
149
|
+
artifactVersionId: string | null;
|
|
150
|
+
errors: string[];
|
|
151
|
+
};
|
|
112
152
|
};
|
|
113
153
|
};
|
|
114
154
|
export type SetPublishedSkillPreferenceResponse = {
|
|
@@ -231,6 +271,10 @@ export type WizardArtifactDetailPayload = WizardArtifactCatalogItem['artifactVer
|
|
|
231
271
|
export type PublishedSkillArtifactDetailPurpose = 'TOOL_FETCH';
|
|
232
272
|
export type GraphQLErrorItem = {
|
|
233
273
|
message: string;
|
|
274
|
+
path?: Array<string | number>;
|
|
275
|
+
extensions?: {
|
|
276
|
+
code?: string;
|
|
277
|
+
} & Record<string, unknown>;
|
|
234
278
|
};
|
|
235
279
|
export type GraphQLResponse<TData> = {
|
|
236
280
|
data?: TData;
|
|
@@ -285,6 +329,7 @@ export type FetchResult = {
|
|
|
285
329
|
status: 'missing_auth' | 'request_failed';
|
|
286
330
|
authMode: 'missing' | 'session';
|
|
287
331
|
message: string;
|
|
332
|
+
graphQlErrors?: string[];
|
|
288
333
|
fetchedAt: string;
|
|
289
334
|
source: 'network' | 'cache';
|
|
290
335
|
};
|
package/dist/server/types.js.map
CHANGED
|
@@ -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 admin: {\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};\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":[]}
|