@aexol/opencode-wizard 0.3.2 → 0.3.4

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 (97) hide show
  1. package/README.md +4 -0
  2. package/dist/graphql-operations.d.ts +4 -0
  3. package/dist/graphql-operations.js +225 -0
  4. package/dist/graphql-operations.js.map +1 -0
  5. package/dist/plugin-tools.d.ts +64 -0
  6. package/dist/plugin-tools.js +57 -0
  7. package/dist/plugin-tools.js.map +1 -0
  8. package/dist/published-skills-system-note.d.ts +9 -0
  9. package/dist/published-skills-system-note.js +34 -0
  10. package/dist/published-skills-system-note.js.map +1 -0
  11. package/dist/published-skills-transform.d.ts +161 -0
  12. package/dist/published-skills-transform.js +238 -0
  13. package/dist/published-skills-transform.js.map +1 -0
  14. package/dist/server/auth-flow.d.ts +10 -0
  15. package/dist/server/auth-flow.js +215 -0
  16. package/dist/server/auth-flow.js.map +1 -0
  17. package/dist/server/auth-store.d.ts +19 -0
  18. package/dist/server/auth-store.js +177 -0
  19. package/dist/server/auth-store.js.map +1 -0
  20. package/dist/server/client.d.ts +51 -0
  21. package/dist/server/client.js +244 -0
  22. package/dist/server/client.js.map +1 -0
  23. package/dist/server/config.d.ts +2 -0
  24. package/dist/server/config.js +82 -0
  25. package/dist/server/config.js.map +1 -0
  26. package/dist/server/constants.d.ts +26 -0
  27. package/dist/server/constants.js +32 -0
  28. package/dist/server/constants.js.map +1 -0
  29. package/dist/server/path-utils.d.ts +2 -0
  30. package/dist/server/path-utils.js +8 -0
  31. package/dist/server/path-utils.js.map +1 -0
  32. package/dist/server/presence.d.ts +14 -0
  33. package/dist/server/presence.js +68 -0
  34. package/dist/server/presence.js.map +1 -0
  35. package/dist/server/runtime.d.ts +32 -0
  36. package/dist/server/runtime.js +1110 -0
  37. package/dist/server/runtime.js.map +1 -0
  38. package/dist/server/status.d.ts +27 -0
  39. package/dist/server/status.js +224 -0
  40. package/dist/server/status.js.map +1 -0
  41. package/dist/server/types.d.ts +321 -0
  42. package/dist/server/types.js +2 -0
  43. package/dist/server/types.js.map +1 -0
  44. package/dist/server/workspace.d.ts +15 -0
  45. package/dist/server/workspace.js +126 -0
  46. package/dist/server/workspace.js.map +1 -0
  47. package/dist/server.d.ts +4 -304
  48. package/dist/server.js +4 -2489
  49. package/dist/server.js.map +1 -1
  50. package/dist/smoke-published-skills.js +11 -9
  51. package/dist/smoke-published-skills.js.map +1 -1
  52. package/dist/tui/components/common.d.ts +15 -0
  53. package/dist/tui/components/common.js +81 -0
  54. package/dist/tui/components/common.js.map +1 -0
  55. package/dist/tui/components/preference-action-notice-row.d.ts +5 -0
  56. package/dist/tui/components/preference-action-notice-row.js +17 -0
  57. package/dist/tui/components/preference-action-notice-row.js.map +1 -0
  58. package/dist/tui/components/skill-catalog-row.d.ts +8 -0
  59. package/dist/tui/components/skill-catalog-row.js +124 -0
  60. package/dist/tui/components/skill-catalog-row.js.map +1 -0
  61. package/dist/tui/components/status-content.d.ts +14 -0
  62. package/dist/tui/components/status-content.js +131 -0
  63. package/dist/tui/components/status-content.js.map +1 -0
  64. package/dist/tui/components/wizard-skills-dialog-content.d.ts +9 -0
  65. package/dist/tui/components/wizard-skills-dialog-content.js +219 -0
  66. package/dist/tui/components/wizard-skills-dialog-content.js.map +1 -0
  67. package/dist/tui/components/wizard-skills-dialog.d.ts +7 -0
  68. package/dist/tui/components/wizard-skills-dialog.js +156 -0
  69. package/dist/tui/components/wizard-skills-dialog.js.map +1 -0
  70. package/dist/tui/constants.d.ts +8 -0
  71. package/dist/tui/constants.js +9 -0
  72. package/dist/tui/constants.js.map +1 -0
  73. package/dist/tui/formatting.d.ts +8 -0
  74. package/dist/tui/formatting.js +45 -0
  75. package/dist/tui/formatting.js.map +1 -0
  76. package/dist/tui/plugin.d.ts +2 -0
  77. package/dist/tui/plugin.js +26 -0
  78. package/dist/tui/plugin.js.map +1 -0
  79. package/dist/tui/rendering.d.ts +2 -0
  80. package/dist/tui/rendering.js +8 -0
  81. package/dist/tui/rendering.js.map +1 -0
  82. package/dist/tui/skill-helpers.d.ts +13 -0
  83. package/dist/tui/skill-helpers.js +49 -0
  84. package/dist/tui/skill-helpers.js.map +1 -0
  85. package/dist/tui/slots.d.ts +2 -0
  86. package/dist/tui/slots.js +56 -0
  87. package/dist/tui/slots.js.map +1 -0
  88. package/dist/tui/status.d.ts +2 -0
  89. package/dist/tui/status.js +21 -0
  90. package/dist/tui/status.js.map +1 -0
  91. package/dist/tui/types.d.ts +75 -0
  92. package/dist/tui/types.js +2 -0
  93. package/dist/tui/types.js.map +1 -0
  94. package/dist/tui.d.ts +1 -44
  95. package/dist/tui.js +2 -870
  96. package/dist/tui.js.map +1 -1
  97. package/package.json +1 -1
@@ -0,0 +1,26 @@
1
+ export declare const PLUGIN_ID = "opencode-wizard";
2
+ export declare const CACHE_TTL_MS = 30000;
3
+ export declare const WORKSPACE_MAPPING_LIMIT = 100;
4
+ export declare const ROOT_SKILL_SEED_PATH = ".opencode/skills";
5
+ export declare const getGlobalConfigPath: () => string;
6
+ export declare const LEGACY_AUTH_STATE_PATH = "plugin/opencode-wizard/.generated/auth-state.json";
7
+ export declare const OIDC_ISSUER = "https://login.microsoftonline.com/86f4caf4-0d6f-4682-9a06-ea57f3e4e76c/v2.0";
8
+ export declare const OIDC_CLIENT_ID = "da963901-2375-442b-9e99-14e59f43eda2";
9
+ export declare const OIDC_CALLBACK_ORIGIN = "http://localhost:24953";
10
+ export declare const OIDC_CALLBACK_PATH = "/oauth/callback";
11
+ export declare const OIDC_CALLBACK_URL = "http://localhost:24953/oauth/callback";
12
+ export declare const OIDC_SCOPES: string[];
13
+ export declare const LOGIN_TIMEOUT_MS: number;
14
+ export declare const PRESENCE_EVENT_TIMEOUT_MS = 3000;
15
+ export declare const PRESENCE_EVENT_MAX_ATTEMPTS = 2;
16
+ export declare const PRESENCE_EVENT_RETRY_DELAY_MS = 250;
17
+ export declare const PRESENCE_SHUTDOWN_SIGNALS: readonly ["SIGINT", "SIGTERM", "SIGHUP"];
18
+ export declare const PRESENCE_SIGNAL_EXIT_CODES: Record<(typeof PRESENCE_SHUTDOWN_SIGNALS)[number], number>;
19
+ export type NativeSkillsUrlCompatibility = {
20
+ configKey: 'skills.urls';
21
+ deliveryMode: 'public_static_registry';
22
+ wizardPrivateDelivery: 'authenticated_scoped_fetch_tool';
23
+ authSupport: 'none';
24
+ guidance: string;
25
+ };
26
+ export declare const NATIVE_SKILLS_URL_COMPATIBILITY: NativeSkillsUrlCompatibility;
@@ -0,0 +1,32 @@
1
+ import os from 'node:os';
2
+ import path from 'node:path';
3
+ export const PLUGIN_ID = 'opencode-wizard';
4
+ export const CACHE_TTL_MS = 30_000;
5
+ export const WORKSPACE_MAPPING_LIMIT = 100;
6
+ export const ROOT_SKILL_SEED_PATH = '.opencode/skills';
7
+ export const getGlobalConfigPath = () => path.join(os.homedir(), '.config', 'opencode', 'opencode-wizard.json');
8
+ export const LEGACY_AUTH_STATE_PATH = 'plugin/opencode-wizard/.generated/auth-state.json';
9
+ export const OIDC_ISSUER = 'https://login.microsoftonline.com/86f4caf4-0d6f-4682-9a06-ea57f3e4e76c/v2.0';
10
+ export const OIDC_CLIENT_ID = 'da963901-2375-442b-9e99-14e59f43eda2';
11
+ export const OIDC_CALLBACK_ORIGIN = 'http://localhost:24953';
12
+ export const OIDC_CALLBACK_PATH = '/oauth/callback';
13
+ export const OIDC_CALLBACK_URL = `${OIDC_CALLBACK_ORIGIN}${OIDC_CALLBACK_PATH}`;
14
+ export const OIDC_SCOPES = ['openid', 'profile', 'email'];
15
+ export const LOGIN_TIMEOUT_MS = 5 * 60_000;
16
+ export const PRESENCE_EVENT_TIMEOUT_MS = 3_000;
17
+ export const PRESENCE_EVENT_MAX_ATTEMPTS = 2;
18
+ export const PRESENCE_EVENT_RETRY_DELAY_MS = 250;
19
+ export const PRESENCE_SHUTDOWN_SIGNALS = ['SIGINT', 'SIGTERM', 'SIGHUP'];
20
+ export const PRESENCE_SIGNAL_EXIT_CODES = {
21
+ SIGINT: 130,
22
+ SIGTERM: 143,
23
+ SIGHUP: 129
24
+ };
25
+ export const NATIVE_SKILLS_URL_COMPATIBILITY = {
26
+ configKey: 'skills.urls',
27
+ deliveryMode: 'public_static_registry',
28
+ wizardPrivateDelivery: 'authenticated_scoped_fetch_tool',
29
+ authSupport: 'none',
30
+ guidance: 'OpenCode skills.urls is for public/static registries and complements opencode-wizard; private workspace-scoped skills stay available through the authenticated fetch tool only.'
31
+ };
32
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["os","path","PLUGIN_ID","CACHE_TTL_MS","WORKSPACE_MAPPING_LIMIT","ROOT_SKILL_SEED_PATH","getGlobalConfigPath","join","homedir","LEGACY_AUTH_STATE_PATH","OIDC_ISSUER","OIDC_CLIENT_ID","OIDC_CALLBACK_ORIGIN","OIDC_CALLBACK_PATH","OIDC_CALLBACK_URL","OIDC_SCOPES","LOGIN_TIMEOUT_MS","PRESENCE_EVENT_TIMEOUT_MS","PRESENCE_EVENT_MAX_ATTEMPTS","PRESENCE_EVENT_RETRY_DELAY_MS","PRESENCE_SHUTDOWN_SIGNALS","PRESENCE_SIGNAL_EXIT_CODES","SIGINT","SIGTERM","SIGHUP","NATIVE_SKILLS_URL_COMPATIBILITY","configKey","deliveryMode","wizardPrivateDelivery","authSupport","guidance"],"sources":["../../src/server/constants.ts"],"sourcesContent":["import os from 'node:os';\nimport path from 'node:path';\n\nexport const PLUGIN_ID = 'opencode-wizard';\nexport const CACHE_TTL_MS = 30_000;\nexport const WORKSPACE_MAPPING_LIMIT = 100;\nexport const ROOT_SKILL_SEED_PATH = '.opencode/skills';\nexport const getGlobalConfigPath = (): string => path.join(os.homedir(), '.config', 'opencode', 'opencode-wizard.json');\nexport const LEGACY_AUTH_STATE_PATH = 'plugin/opencode-wizard/.generated/auth-state.json';\nexport const OIDC_ISSUER = 'https://login.microsoftonline.com/86f4caf4-0d6f-4682-9a06-ea57f3e4e76c/v2.0';\nexport const OIDC_CLIENT_ID = 'da963901-2375-442b-9e99-14e59f43eda2';\nexport const OIDC_CALLBACK_ORIGIN = 'http://localhost:24953';\nexport const OIDC_CALLBACK_PATH = '/oauth/callback';\nexport const OIDC_CALLBACK_URL = `${OIDC_CALLBACK_ORIGIN}${OIDC_CALLBACK_PATH}`;\nexport const OIDC_SCOPES = ['openid', 'profile', 'email'];\nexport const LOGIN_TIMEOUT_MS = 5 * 60_000;\nexport const PRESENCE_EVENT_TIMEOUT_MS = 3_000;\nexport const PRESENCE_EVENT_MAX_ATTEMPTS = 2;\nexport const PRESENCE_EVENT_RETRY_DELAY_MS = 250;\nexport const PRESENCE_SHUTDOWN_SIGNALS = ['SIGINT', 'SIGTERM', 'SIGHUP'] as const satisfies readonly NodeJS.Signals[];\nexport const PRESENCE_SIGNAL_EXIT_CODES: Record<(typeof PRESENCE_SHUTDOWN_SIGNALS)[number], number> = {\n SIGINT: 130,\n SIGTERM: 143,\n SIGHUP: 129,\n};\n\nexport type NativeSkillsUrlCompatibility = {\n configKey: 'skills.urls';\n deliveryMode: 'public_static_registry';\n wizardPrivateDelivery: 'authenticated_scoped_fetch_tool';\n authSupport: 'none';\n guidance: string;\n};\n\nexport const NATIVE_SKILLS_URL_COMPATIBILITY: NativeSkillsUrlCompatibility = {\n configKey: 'skills.urls',\n deliveryMode: 'public_static_registry',\n wizardPrivateDelivery: 'authenticated_scoped_fetch_tool',\n authSupport: 'none',\n guidance:\n 'OpenCode skills.urls is for public/static registries and complements opencode-wizard; private workspace-scoped skills stay available through the authenticated fetch tool only.',\n};\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,SAAS;AACxB,OAAOC,IAAI,MAAM,WAAW;AAE5B,OAAO,MAAMC,SAAS,GAAG,iBAAiB;AAC1C,OAAO,MAAMC,YAAY,GAAG,MAAM;AAClC,OAAO,MAAMC,uBAAuB,GAAG,GAAG;AAC1C,OAAO,MAAMC,oBAAoB,GAAG,kBAAkB;AACtD,OAAO,MAAMC,mBAAmB,GAAGA,CAAA,KAAcL,IAAI,CAACM,IAAI,CAACP,EAAE,CAACQ,OAAO,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,sBAAsB,CAAC;AACvH,OAAO,MAAMC,sBAAsB,GAAG,mDAAmD;AACzF,OAAO,MAAMC,WAAW,GAAG,6EAA6E;AACxG,OAAO,MAAMC,cAAc,GAAG,sCAAsC;AACpE,OAAO,MAAMC,oBAAoB,GAAG,wBAAwB;AAC5D,OAAO,MAAMC,kBAAkB,GAAG,iBAAiB;AACnD,OAAO,MAAMC,iBAAiB,GAAG,GAAGF,oBAAoB,GAAGC,kBAAkB,EAAE;AAC/E,OAAO,MAAME,WAAW,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;AACzD,OAAO,MAAMC,gBAAgB,GAAG,CAAC,GAAG,MAAM;AAC1C,OAAO,MAAMC,yBAAyB,GAAG,KAAK;AAC9C,OAAO,MAAMC,2BAA2B,GAAG,CAAC;AAC5C,OAAO,MAAMC,6BAA6B,GAAG,GAAG;AAChD,OAAO,MAAMC,yBAAyB,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAA8C;AACrH,OAAO,MAAMC,0BAAsF,GAAG;EACpGC,MAAM,EAAE,GAAG;EACXC,OAAO,EAAE,GAAG;EACZC,MAAM,EAAE;AACV,CAAC;AAUD,OAAO,MAAMC,+BAA6D,GAAG;EAC3EC,SAAS,EAAE,aAAa;EACxBC,YAAY,EAAE,wBAAwB;EACtCC,qBAAqB,EAAE,iCAAiC;EACxDC,WAAW,EAAE,MAAM;EACnBC,QAAQ,EACN;AACJ,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export declare const normalizeAbsolutePath: (value: string) => string;
2
+ export declare const toWorkspaceSlug: (value: string) => string;
@@ -0,0 +1,8 @@
1
+ import path from 'node:path';
2
+ export const normalizeAbsolutePath = value => path.resolve(value);
3
+ export const toWorkspaceSlug = value => {
4
+ const normalized = value.trim().toLowerCase().replace(/[^a-z0-9-]+/gu, '-').replace(/^-+|-+$/gu, '');
5
+ if (normalized) return normalized;
6
+ return 'workspace';
7
+ };
8
+ //# sourceMappingURL=path-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["path","normalizeAbsolutePath","value","resolve","toWorkspaceSlug","normalized","trim","toLowerCase","replace"],"sources":["../../src/server/path-utils.ts"],"sourcesContent":["import path from 'node:path';\n\nexport const normalizeAbsolutePath = (value: string): string => path.resolve(value);\n\nexport const toWorkspaceSlug = (value: string): string => {\n const normalized = value\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9-]+/gu, '-')\n .replace(/^-+|-+$/gu, '');\n\n if (normalized) return normalized;\n return 'workspace';\n};\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,WAAW;AAE5B,OAAO,MAAMC,qBAAqB,GAAIC,KAAa,IAAaF,IAAI,CAACG,OAAO,CAACD,KAAK,CAAC;AAEnF,OAAO,MAAME,eAAe,GAAIF,KAAa,IAAa;EACxD,MAAMG,UAAU,GAAGH,KAAK,CACrBI,IAAI,CAAC,CAAC,CACNC,WAAW,CAAC,CAAC,CACbC,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC,CAC7BA,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;EAE3B,IAAIH,UAAU,EAAE,OAAOA,UAAU;EACjC,OAAO,WAAW;AACpB,CAAC","ignoreList":[]}
@@ -0,0 +1,14 @@
1
+ import type { AuthState, PluginActionEventType, PresenceEventType, ResolvedConfig } from './types.js';
2
+ export declare const emitPresenceEvent: ({ config, authState, event, workspacePath, }: {
3
+ config: ResolvedConfig;
4
+ authState: AuthState;
5
+ event: PresenceEventType;
6
+ workspacePath: string;
7
+ }) => Promise<void>;
8
+ export declare const emitPluginActionEvent: ({ config, authState, event, workspacePath, directoryPath, }: {
9
+ config: ResolvedConfig;
10
+ authState: AuthState | null;
11
+ event: PluginActionEventType;
12
+ workspacePath: string;
13
+ directoryPath?: string;
14
+ }) => Promise<void>;
@@ -0,0 +1,68 @@
1
+ import { PRESENCE_EVENT_MAX_ATTEMPTS, PRESENCE_EVENT_RETRY_DELAY_MS, PRESENCE_EVENT_TIMEOUT_MS } from './constants.js';
2
+ const wait = async milliseconds => {
3
+ await new Promise(resolve => {
4
+ setTimeout(resolve, milliseconds);
5
+ });
6
+ };
7
+ const shouldRetryPresenceEvent = status => {
8
+ return status === 408 || status === 429 || status >= 500;
9
+ };
10
+ export const emitPresenceEvent = async ({
11
+ config,
12
+ authState,
13
+ event,
14
+ workspacePath
15
+ }) => {
16
+ for (let attempt = 1; attempt <= PRESENCE_EVENT_MAX_ATTEMPTS; attempt += 1) {
17
+ try {
18
+ const response = await fetch(config.presenceUrl, {
19
+ method: 'POST',
20
+ headers: {
21
+ 'content-type': 'application/json',
22
+ authorization: `Bearer ${authState.sessionToken}`
23
+ },
24
+ body: JSON.stringify({
25
+ event,
26
+ occurredAt: new Date().toISOString(),
27
+ workspacePath
28
+ }),
29
+ keepalive: event === 'STOP',
30
+ signal: AbortSignal.timeout(PRESENCE_EVENT_TIMEOUT_MS)
31
+ });
32
+ if (response.ok) return;
33
+ if (!shouldRetryPresenceEvent(response.status) || attempt === PRESENCE_EVENT_MAX_ATTEMPTS) return;
34
+ } catch {
35
+ if (attempt === PRESENCE_EVENT_MAX_ATTEMPTS) return;
36
+ }
37
+ await wait(PRESENCE_EVENT_RETRY_DELAY_MS * attempt);
38
+ }
39
+ };
40
+ export const emitPluginActionEvent = async ({
41
+ config,
42
+ authState,
43
+ event,
44
+ workspacePath,
45
+ directoryPath
46
+ }) => {
47
+ if (!authState) return;
48
+ try {
49
+ await fetch(config.actionsUrl, {
50
+ method: 'POST',
51
+ headers: {
52
+ 'content-type': 'application/json',
53
+ authorization: `Bearer ${authState.sessionToken}`
54
+ },
55
+ body: JSON.stringify({
56
+ event,
57
+ occurredAt: new Date().toISOString(),
58
+ workspacePath,
59
+ directoryPath
60
+ }),
61
+ keepalive: event === 'STOP',
62
+ signal: AbortSignal.timeout(PRESENCE_EVENT_TIMEOUT_MS)
63
+ });
64
+ } catch {
65
+ return;
66
+ }
67
+ };
68
+ //# sourceMappingURL=presence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PRESENCE_EVENT_MAX_ATTEMPTS","PRESENCE_EVENT_RETRY_DELAY_MS","PRESENCE_EVENT_TIMEOUT_MS","wait","milliseconds","Promise","resolve","setTimeout","shouldRetryPresenceEvent","status","emitPresenceEvent","config","authState","event","workspacePath","attempt","response","fetch","presenceUrl","method","headers","authorization","sessionToken","body","JSON","stringify","occurredAt","Date","toISOString","keepalive","signal","AbortSignal","timeout","ok","emitPluginActionEvent","directoryPath","actionsUrl"],"sources":["../../src/server/presence.ts"],"sourcesContent":["import {\n PRESENCE_EVENT_MAX_ATTEMPTS,\n PRESENCE_EVENT_RETRY_DELAY_MS,\n PRESENCE_EVENT_TIMEOUT_MS,\n} from './constants.js';\nimport type { AuthState, PluginActionEventType, PresenceEventType, ResolvedConfig } from './types.js';\n\nconst wait = async (milliseconds: number): Promise<void> => {\n await new Promise<void>((resolve) => {\n setTimeout(resolve, milliseconds);\n });\n};\n\nconst shouldRetryPresenceEvent = (status: number): boolean => {\n return status === 408 || status === 429 || status >= 500;\n};\n\nexport const emitPresenceEvent = async ({\n config,\n authState,\n event,\n workspacePath,\n}: {\n config: ResolvedConfig;\n authState: AuthState;\n event: PresenceEventType;\n workspacePath: string;\n}): Promise<void> => {\n for (let attempt = 1; attempt <= PRESENCE_EVENT_MAX_ATTEMPTS; attempt += 1) {\n try {\n const response = await fetch(config.presenceUrl, {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n authorization: `Bearer ${authState.sessionToken}`,\n },\n body: JSON.stringify({\n event,\n occurredAt: new Date().toISOString(),\n workspacePath,\n }),\n keepalive: event === 'STOP',\n signal: AbortSignal.timeout(PRESENCE_EVENT_TIMEOUT_MS),\n });\n\n if (response.ok) return;\n if (!shouldRetryPresenceEvent(response.status) || attempt === PRESENCE_EVENT_MAX_ATTEMPTS) return;\n } catch {\n if (attempt === PRESENCE_EVENT_MAX_ATTEMPTS) return;\n }\n\n await wait(PRESENCE_EVENT_RETRY_DELAY_MS * attempt);\n }\n};\n\nexport const emitPluginActionEvent = async ({\n config,\n authState,\n event,\n workspacePath,\n directoryPath,\n}: {\n config: ResolvedConfig;\n authState: AuthState | null;\n event: PluginActionEventType;\n workspacePath: string;\n directoryPath?: string;\n}): Promise<void> => {\n if (!authState) return;\n\n try {\n await fetch(config.actionsUrl, {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n authorization: `Bearer ${authState.sessionToken}`,\n },\n body: JSON.stringify({\n event,\n occurredAt: new Date().toISOString(),\n workspacePath,\n directoryPath,\n }),\n keepalive: event === 'STOP',\n signal: AbortSignal.timeout(PRESENCE_EVENT_TIMEOUT_MS),\n });\n } catch {\n return;\n }\n};\n"],"mappings":"AAAA,SACEA,2BAA2B,EAC3BC,6BAA6B,EAC7BC,yBAAyB,QACpB,gBAAgB;AAGvB,MAAMC,IAAI,GAAG,MAAOC,YAAoB,IAAoB;EAC1D,MAAM,IAAIC,OAAO,CAAQC,OAAO,IAAK;IACnCC,UAAU,CAACD,OAAO,EAAEF,YAAY,CAAC;EACnC,CAAC,CAAC;AACJ,CAAC;AAED,MAAMI,wBAAwB,GAAIC,MAAc,IAAc;EAC5D,OAAOA,MAAM,KAAK,GAAG,IAAIA,MAAM,KAAK,GAAG,IAAIA,MAAM,IAAI,GAAG;AAC1D,CAAC;AAED,OAAO,MAAMC,iBAAiB,GAAG,MAAAA,CAAO;EACtCC,MAAM;EACNC,SAAS;EACTC,KAAK;EACLC;AAMF,CAAC,KAAoB;EACnB,KAAK,IAAIC,OAAO,GAAG,CAAC,EAAEA,OAAO,IAAIf,2BAA2B,EAAEe,OAAO,IAAI,CAAC,EAAE;IAC1E,IAAI;MACF,MAAMC,QAAQ,GAAG,MAAMC,KAAK,CAACN,MAAM,CAACO,WAAW,EAAE;QAC/CC,MAAM,EAAE,MAAM;QACdC,OAAO,EAAE;UACP,cAAc,EAAE,kBAAkB;UAClCC,aAAa,EAAE,UAAUT,SAAS,CAACU,YAAY;QACjD,CAAC;QACDC,IAAI,EAAEC,IAAI,CAACC,SAAS,CAAC;UACnBZ,KAAK;UACLa,UAAU,EAAE,IAAIC,IAAI,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC;UACpCd;QACF,CAAC,CAAC;QACFe,SAAS,EAAEhB,KAAK,KAAK,MAAM;QAC3BiB,MAAM,EAAEC,WAAW,CAACC,OAAO,CAAC9B,yBAAyB;MACvD,CAAC,CAAC;MAEF,IAAIc,QAAQ,CAACiB,EAAE,EAAE;MACjB,IAAI,CAACzB,wBAAwB,CAACQ,QAAQ,CAACP,MAAM,CAAC,IAAIM,OAAO,KAAKf,2BAA2B,EAAE;IAC7F,CAAC,CAAC,MAAM;MACN,IAAIe,OAAO,KAAKf,2BAA2B,EAAE;IAC/C;IAEA,MAAMG,IAAI,CAACF,6BAA6B,GAAGc,OAAO,CAAC;EACrD;AACF,CAAC;AAED,OAAO,MAAMmB,qBAAqB,GAAG,MAAAA,CAAO;EAC1CvB,MAAM;EACNC,SAAS;EACTC,KAAK;EACLC,aAAa;EACbqB;AAOF,CAAC,KAAoB;EACnB,IAAI,CAACvB,SAAS,EAAE;EAEhB,IAAI;IACF,MAAMK,KAAK,CAACN,MAAM,CAACyB,UAAU,EAAE;MAC7BjB,MAAM,EAAE,MAAM;MACdC,OAAO,EAAE;QACP,cAAc,EAAE,kBAAkB;QAClCC,aAAa,EAAE,UAAUT,SAAS,CAACU,YAAY;MACjD,CAAC;MACDC,IAAI,EAAEC,IAAI,CAACC,SAAS,CAAC;QACnBZ,KAAK;QACLa,UAAU,EAAE,IAAIC,IAAI,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC;QACpCd,aAAa;QACbqB;MACF,CAAC,CAAC;MACFN,SAAS,EAAEhB,KAAK,KAAK,MAAM;MAC3BiB,MAAM,EAAEC,WAAW,CAACC,OAAO,CAAC9B,yBAAyB;IACvD,CAAC,CAAC;EACJ,CAAC,CAAC,MAAM;IACN;EACF;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ export { resolveConfig } from './config.js';
2
+ export { PLUGIN_ID, NATIVE_SKILLS_URL_COMPATIBILITY, type NativeSkillsUrlCompatibility } from './constants.js';
3
+ export { buildSystemNote, resolvePluginStatusSnapshot, toPluginAuthStateSummary, toPublishedSkillCatalog, } from './status.js';
4
+ import type { OpencodePluginServer, PluginStatusSnapshot, PublishedSkillsIgnoreState } from './types.js';
5
+ export type { PluginAuthStateSummary, PluginStatusSnapshot, PublishedSkillCatalogItem, PublishedSkillCatalogPayload, PublishedSkillDetailItem, PublishedSkillInstallableCatalogItem, } from './types.js';
6
+ export declare const resolvePluginStatusSnapshotWithAuthBootstrap: ({ worktree, directory, signal, }: {
7
+ worktree: string;
8
+ directory: string;
9
+ signal: AbortSignal;
10
+ }) => Promise<PluginStatusSnapshot>;
11
+ export declare const setPublishedSkillIgnored: ({ worktree, directory, skillSlug, ignored, preferenceScope, }: {
12
+ worktree: string;
13
+ directory: string;
14
+ scopeKey?: string;
15
+ skillSlug: string;
16
+ ignored: boolean;
17
+ preferenceScope?: "global" | "project";
18
+ }) => Promise<PublishedSkillsIgnoreState>;
19
+ export declare const setPublishedSkillInstalled: ({ worktree, directory, skillSlug, installed, preferenceScope, }: {
20
+ worktree: string;
21
+ directory: string;
22
+ scopeKey?: string;
23
+ skillSlug: string;
24
+ installed: boolean;
25
+ preferenceScope: "global" | "project";
26
+ }) => Promise<PublishedSkillsIgnoreState>;
27
+ export declare const OpencodeWizardSkillsPlugin: OpencodePluginServer;
28
+ declare const _default: {
29
+ id: string;
30
+ server: OpencodePluginServer;
31
+ };
32
+ export default _default;