@xopcai/xopc 0.0.172 → 0.0.174
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/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-C3Y-bESI.js → activity-store-CyEDJeIt.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CPyev9P7.js → agent-avatar-dicebear-DF7Bol6I.js} +1 -1
- package/dist/gateway/static/root/assets/agents-BVxEFPQ5.js +2 -0
- package/dist/gateway/static/root/assets/{api-B7qEr_Rw.js → api-DYunqroX.js} +1 -1
- package/dist/gateway/static/root/assets/api-DwyUxpgY.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-Br_9-7fs.js → app-management-settings-panel-B4xJyvDu.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-uyLcRPai.js → appearance-settings-B2PQxRiu.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-BtIgd82S.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-B19REnR5.js → archive-plugin-DWhBmmjD.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-DLWCC4Yi.js → attachment-load-BOpZfa_I.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-suggestion-card-ky5S5lly.js → automation-suggestion-card-Byu3I7Rs.js} +1 -1
- package/dist/gateway/static/root/assets/automations-page-CG_SCH5b.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CtPEzLlo.js → binary-plugins-6AG1qatz.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CQVR4Xij.js → block-editor-CJhrn98_.js} +5 -5
- package/dist/gateway/static/root/assets/browser-settings-page-CfLqPWZC.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-CimCGbhq.js → browser-workflow-inputs-CBVb4mt9.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-DewuCw3p.js → browser-workflows-page-Cq4XUKbu.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DCJmm6cR.js +7 -0
- package/dist/gateway/static/root/assets/{capability-presets-api-B5RTs-Az.js → capability-presets-api-hbW4NAKO.js} +1 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-CnkAYvWI.js +1 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-Czu0YzIZ.js → channel-recipient-api-CzMjHb17.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-DtqqFpDn.js +1 -0
- package/dist/gateway/static/root/assets/channels-status-swr-C-5yHbc0.js +1 -0
- package/dist/gateway/static/root/assets/{connector-logo-Di3gnR_D.js → connector-logo-B9Au6gMZ.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-CaHfs8YF.js +2 -0
- package/dist/gateway/static/root/assets/copy-VueTIC2x.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-CvFMKYdb.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-settings-C3L6AI8_.js → desktop-pet-settings-CNff5TFb.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-Dvq4iG6P.js → directory-picker-path-field-Bf956uo-.js} +1 -1
- package/dist/gateway/static/root/assets/dreaming-settings-CHM8FE1g.js +3 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-BecQjU0J.js → extension-debug-page-ZqM_0eUs.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BeVkPSm-.js → extension-page-D4hvXOMM.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-DMoo2mKx.js → extension-settings-page-GsqxaJjA.js} +1 -1
- package/dist/gateway/static/root/assets/focus-detail-page-CE6uwrl1.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-api-Bthb3_6v.js → gateway-config-api-B4THmgnS.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-Bh8nPvJQ.js → gateway-settings-CPv-MxGE.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-D3USVm9D.js → gateway-startup-retry-MP3K71pP.js} +1 -1
- package/dist/gateway/static/root/assets/goal-create-dialog-DAeb82xP.js +1 -0
- package/dist/gateway/static/root/assets/goal-detail-page-CwLSp01r.js +4 -0
- package/dist/gateway/static/root/assets/{goals-config-api-C_2QWBtb.js → goals-config-api-DCcDuIjG.js} +1 -1
- package/dist/gateway/static/root/assets/goals-page-DvJQ6_4M.js +2 -0
- package/dist/gateway/static/root/assets/{goals-settings-DhL643tc.js → goals-settings-o9QMXvNq.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-COVFwp7C.js → heartbeat-settings-DixwpXnH.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-BNQlnwpU.js → image-generation-api-BOGH9FGi.js} +1 -1
- package/dist/gateway/static/root/assets/index-CfXiRNN5.css +1 -0
- package/dist/gateway/static/root/assets/index-eyttVNS_.js +212 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DfdJRJVy.js → keyboard-shortcuts-settings-D4o4ZPF6.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CPcfqn_A.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-BvCPOgoi.js → local-apps-page-GzMmpO7G.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-BP0vD37A.js → locale-store-CAuhEGCn.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-DXABWCZp.js +7 -0
- package/dist/gateway/static/root/assets/{markdown-split-YO1rDk9m.js → markdown-split-CIX8D1pv.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CU_RRf-q.js → media-plugins-Bp3eIA45.js} +1 -1
- package/dist/gateway/static/root/assets/messages-BiBdO1-O.js +3 -0
- package/dist/gateway/static/root/assets/{notes-page-CeFiOK3S.js → notes-page-RVFiYAoO.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-DgJzZRX3.js +4 -0
- package/dist/gateway/static/root/assets/{page-tabs-tiHmRJUA.js → page-tabs-BGAYH3Ef.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-CU6XgaCz.js → preview-open-alternatives-BM6pDkHp.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-Dn4_qor4.js → product-open-page-BiMetEmn.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-DF7F70Vg.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-Cw3jyi5s.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-ChAJsaNY.js +1 -0
- package/dist/gateway/static/root/assets/{save-bar-controls-edDUIbXo.js → save-bar-controls-BdjV8MK5.js} +1 -1
- package/dist/gateway/static/root/assets/{schedule-field-DqJO_5Yb.js → schedule-field-ChlqXU46.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-CMh0jzy5.js → schema-form-DDKf5ZSH.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-BxZIxt7z.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DcDLS0xV.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-Bb0Bc3nJ.js → settings-form-section-CPG0KGVs.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-DQhADvz1.js → settings-loading-skeleton-DRSDHucM.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-b0M5HukN.js → settings-page-CeB7_xD0.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-hvjtIjvh.js → settings-page-layout-BENrkwd0.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-4Xa9NA7v.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-rbeaOpTg.js → share-preview-page-DIzczJkG.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-BpN0o5Cf.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-DvF2UAaL.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-CGKXpNfy.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-BHo_hgnL.js → system-settings-panel-Dp4d5Q1B.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-C3KnnjcU.js → theme-store-CbGc1laW.js} +1 -1
- package/dist/gateway/static/root/assets/{time-picker-D-G-uwVJ.js → time-picker-BhgCeDuO.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-DtRnG-YI.js → typed-models-lib-DwPk3OPL.js} +1 -1
- package/dist/gateway/static/root/assets/{use-channel-catalog-CWWItX2g.js → use-channel-catalog-CXrEu2dw.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-Dy_fKAK_.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-BTnltQHZ.js → voice-api-key-field-DFoA79LB.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-page-BWkjb1NK.js +1 -0
- package/dist/gateway/static/root/assets/work-item-detail-page-DLBNFse5.js +1 -0
- package/dist/gateway/static/root/assets/work-page-Bn5RXMIE.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-D7vKChFZ.js → workflow-run-setup-panel-BuniGPO0.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-_vFhRrAl.js +11 -0
- package/dist/gateway/static/root/index.html +7 -7
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.d.ts +3 -1
- package/dist/src/agent/agent-manager.js +4 -3
- package/dist/src/agent/capabilities/definitions.d.ts +2 -1
- package/dist/src/agent/capabilities/definitions.js +3 -1
- package/dist/src/agent/prompt/sections/tooling.js +4 -0
- package/dist/src/agent/service.d.ts +2 -1
- package/dist/src/agent/service.js +26 -0
- package/dist/src/agent/skills/hub-pull.js +1 -1
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/install-target.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.d.ts +64 -0
- package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.js +27 -18
- package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
- package/dist/src/agent/skills/marketplace/search.d.ts +46 -0
- package/dist/src/agent/skills/marketplace/search.js +193 -0
- package/dist/src/agent/skills/skill-tool-gating.js +2 -1
- package/dist/src/agent/tools/delegate-tool.js +2 -0
- package/dist/src/agent/tools/factory.d.ts +4 -2
- package/dist/src/agent/tools/factory.js +11 -5
- package/dist/src/agent/tools/index.d.ts +2 -1
- package/dist/src/agent/tools/index.js +2 -1
- package/dist/src/agent/tools/skill-install-tool.d.ts +17 -0
- package/dist/src/agent/tools/skill-install-tool.js +76 -8
- package/dist/src/agent/tools/skills-marketplace-search-tool.d.ts +17 -0
- package/dist/src/agent/tools/skills-marketplace-search-tool.js +77 -0
- package/dist/src/browser/providers/cloakbrowser.js +1 -1
- package/dist/src/capabilities/store-connector.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/extensions/api.js +1 -1
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/focuses/candidate-repository.d.ts +15 -0
- package/dist/src/focuses/candidate-repository.js +91 -0
- package/dist/src/focuses/index.d.ts +7 -0
- package/dist/src/focuses/index.js +7 -0
- package/dist/src/focuses/insight-repository.d.ts +22 -0
- package/dist/src/focuses/insight-repository.js +77 -0
- package/dist/src/focuses/prompts.d.ts +2 -0
- package/dist/src/focuses/prompts.js +18 -0
- package/dist/src/focuses/reconciler.d.ts +5 -0
- package/dist/src/focuses/reconciler.js +26 -0
- package/dist/src/focuses/repository.d.ts +61 -0
- package/dist/src/focuses/repository.js +214 -0
- package/dist/src/focuses/run-processor.d.ts +18 -0
- package/dist/src/focuses/run-processor.js +162 -0
- package/dist/src/focuses/service.d.ts +42 -0
- package/dist/src/focuses/service.js +241 -0
- package/dist/src/focuses/types.d.ts +89 -0
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agent-builtin-tools.js +2 -0
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +2 -2
- package/dist/src/gateway/hono/routes/focuses.d.ts +3 -0
- package/dist/src/gateway/hono/routes/focuses.js +319 -0
- package/dist/src/gateway/hono/routes/home.js +15 -17
- package/dist/src/gateway/hono/routes/index.js +2 -0
- package/dist/src/gateway/hono/routes/projects.js +2 -103
- package/dist/src/gateway/hono/routes/work-discovery.js +0 -239
- package/dist/src/gateway/service/marketplace-service.js +1 -1
- package/dist/src/gateway/service.d.ts +1 -1
- package/dist/src/gateway/service.js +15 -11
- package/dist/src/storage/sqlite/migrations/066_first_class_focuses.sql +126 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/work-discovery/index.d.ts +0 -2
- package/dist/src/work-discovery/index.js +1 -3
- package/dist/src/work-discovery/service.d.ts +0 -30
- package/dist/src/work-discovery/service.js +1 -35
- package/dist/src/work-discovery/thread-service.d.ts +5 -0
- package/dist/src/work-discovery/thread-service.js +36 -88
- package/package.json +1 -1
- package/skills/tools/find-skills/SKILL.md +18 -428
- package/dist/gateway/static/root/assets/agents-Bf_kK2Ay.js +0 -2
- package/dist/gateway/static/root/assets/apps-page-DXFCP5-1.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-D8pT1o2O.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-Bav_skKN.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BHaYYo9E.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-BgchTh81.js +0 -1
- package/dist/gateway/static/root/assets/channels-settings-BP0e62wt.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-DBWKfeGe.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-CC5kh0de.js +0 -2
- package/dist/gateway/static/root/assets/desktop-pet-D-ZUNHhn.js +0 -1
- package/dist/gateway/static/root/assets/dreaming-settings-D9i54kWO.js +0 -3
- package/dist/gateway/static/root/assets/goal-create-dialog-Dp0AyDHI.js +0 -1
- package/dist/gateway/static/root/assets/goal-detail-page-CNt7nrdS.js +0 -4
- package/dist/gateway/static/root/assets/goals-page-Bm_NZFiZ.js +0 -2
- package/dist/gateway/static/root/assets/index-C_XSKOH6.css +0 -1
- package/dist/gateway/static/root/assets/index-DUasAutC.js +0 -212
- package/dist/gateway/static/root/assets/local-app-workbench-page-DZwkD1co.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-dNL0Y1dA.js +0 -7
- package/dist/gateway/static/root/assets/messages-BWtP5TFz.js +0 -3
- package/dist/gateway/static/root/assets/notes-workbench-B8MKxpZb.js +0 -4
- package/dist/gateway/static/root/assets/project-detail-page-CWBuuX-S.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-BJSsLsXH.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-DXJDb8vB.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-DeHpWgxM.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Cf-TEYUd.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BFyfed_g.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-CYnH9sTt.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-Cr8_m-jS.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-Chtc1xDO.js +0 -2
- package/dist/gateway/static/root/assets/user-context-page-D7qMR26X.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-page-CpqFZze9.js +0 -1
- package/dist/gateway/static/root/assets/work-item-detail-page-t4dXpGC0.js +0 -1
- package/dist/gateway/static/root/assets/work-page-BXwDKiMZ.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-Bos9HyqT.js +0 -11
- package/dist/src/proactive/calendar-signals.d.ts +0 -4
- package/dist/src/proactive/calendar-signals.js +0 -120
- package/dist/src/proactive/focus-service.d.ts +0 -62
- package/dist/src/proactive/focus-service.js +0 -173
- package/dist/src/proactive/index.d.ts +0 -7
- package/dist/src/proactive/index.js +0 -7
- package/dist/src/proactive/insight-repository.d.ts +0 -21
- package/dist/src/proactive/insight-repository.js +0 -109
- package/dist/src/proactive/run-processor.d.ts +0 -19
- package/dist/src/proactive/run-processor.js +0 -146
- package/dist/src/proactive/trial-expiry-reconciler.d.ts +0 -5
- package/dist/src/proactive/trial-expiry-reconciler.js +0 -30
- package/dist/src/proactive/types.d.ts +0 -66
- package/dist/src/proactive/value-score.d.ts +0 -13
- package/dist/src/proactive/value-score.js +0 -30
- package/dist/src/proactive/watch-repository.d.ts +0 -28
- package/dist/src/proactive/watch-repository.js +0 -129
- package/dist/src/work-discovery/governance.d.ts +0 -25
- package/dist/src/work-discovery/governance.js +0 -96
- package/dist/src/work-discovery/thread-repository.d.ts +0 -34
- package/dist/src/work-discovery/thread-repository.js +0 -112
- /package/dist/src/{proactive → focuses}/types.js +0 -0
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260713-1" />
|
|
12
12
|
<link rel="manifest" href="/site.webmanifest?v=20260713-1" />
|
|
13
13
|
<title>XOPC — Turn goals into loops. Keep what matters moving.</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-eyttVNS_.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-zJ_50EbN.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BOUWij0V.js">
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/check-DUBLcKHA.js">
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/circle-alert-BEjgurr2.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/middleware-Pd0e8Igk.js">
|
|
27
|
-
<link rel="modulepreload" crossorigin href="/assets/messages-
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/locale-store-
|
|
27
|
+
<link rel="modulepreload" crossorigin href="/assets/messages-BiBdO1-O.js">
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/locale-store-CAuhEGCn.js">
|
|
29
29
|
<link rel="modulepreload" crossorigin href="/assets/cn-JdwAhgNB.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/schemas-DgQq6Z5S.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/assets/product-delivery-BTRT9kCS.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/assets/config-reload-event-Bjh2zoKp.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/assets/copy-to-clipboard-HOJ79TWv.js">
|
|
34
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-
|
|
35
|
-
<link rel="modulepreload" crossorigin href="/assets/activity-store-
|
|
36
|
-
<link rel="modulepreload" crossorigin href="/assets/theme-store-
|
|
37
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
34
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-MP3K71pP.js">
|
|
35
|
+
<link rel="modulepreload" crossorigin href="/assets/activity-store-CyEDJeIt.js">
|
|
36
|
+
<link rel="modulepreload" crossorigin href="/assets/theme-store-CbGc1laW.js">
|
|
37
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CfXiRNN5.css">
|
|
38
38
|
</head>
|
|
39
39
|
<body>
|
|
40
40
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -9,7 +9,7 @@ import type { AgentInstanceGateway } from './agent-instance-gateway.js';
|
|
|
9
9
|
import { type Config } from '../config/schema.js';
|
|
10
10
|
import { type EffectiveAgentProfile } from '../config/agent-profile.js';
|
|
11
11
|
import type { ModelManager } from './models/manager.js';
|
|
12
|
-
import type { SkillInstallToolOptions, SkillInstallToolResult } from './tools/skill-install-tool.js';
|
|
12
|
+
import type { SkillInstallToolOptions, SkillInstallToolResult, MarketplaceSkillInstallToolOptions, MarketplaceSkillInstallToolResult } from './tools/skill-install-tool.js';
|
|
13
13
|
import { type AgentCapabilityCatalogEntry, type AgentCapabilitySessionState } from './capabilities/index.js';
|
|
14
14
|
import type { GatewayClarifyRequestFn } from './tools/clarify-tool.js';
|
|
15
15
|
import type { ExtensionRegistryImpl as ExtensionRegistry } from '../extensions/index.js';
|
|
@@ -98,6 +98,8 @@ export interface AgentManagerConfig {
|
|
|
98
98
|
}) => void;
|
|
99
99
|
/** Install a managed skill from an explicit source and refresh runtime state. */
|
|
100
100
|
installSkillFromSource?: (opts: SkillInstallToolOptions) => Promise<SkillInstallToolResult>;
|
|
101
|
+
/** Install a managed skill from Store or ClawHub and refresh runtime state. */
|
|
102
|
+
installSkillFromMarketplace?: (opts: MarketplaceSkillInstallToolOptions) => Promise<MarketplaceSkillInstallToolResult>;
|
|
101
103
|
/** Dynamic workspace verification context injected into the system prompt when edits are pending. */
|
|
102
104
|
getSelfVerifyPromptContext?: (sessionKey: string, agentId?: string) => string;
|
|
103
105
|
/**
|
|
@@ -18,6 +18,9 @@ import { resolveBootstrapContextSync } from "./bootstrap/bootstrap-files.js";
|
|
|
18
18
|
import { loadProjectAgentsContextFile } from "./bootstrap/project-agents-context.js";
|
|
19
19
|
import { createSkillConfigManager, isSkillEnabled, resolveSkillConfig } from "./skills/config.js";
|
|
20
20
|
import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "./skills/workspace-skills-dir.js";
|
|
21
|
+
import { isValidSkillEnvVarName } from "./skills/required-env-vars.js";
|
|
22
|
+
import { loadSkillsLock } from "./skills/hub-lock.js";
|
|
23
|
+
import { isUnderManagedSkillsDir } from "./skills/managed-store.js";
|
|
21
24
|
import { isMemorySubsystemEnabled, shouldRegisterCuratedMemoryTool } from "./memory/memory-config.js";
|
|
22
25
|
import { resolveDreamingRoot } from "./memory/dreaming/scope.js";
|
|
23
26
|
import { createAgentCapabilitySessionState, resolveAgentCapabilityCatalog } from "./capabilities/registry.js";
|
|
@@ -27,9 +30,6 @@ import { parseMcpToolName } from "./mcp/bundle-mcp-policy.js";
|
|
|
27
30
|
import { disposeAllSessionMcpRuntimes, retireSessionMcpRuntimeForSessionKey } from "./mcp/bundle-mcp-runtime.js";
|
|
28
31
|
import "./mcp/bundle-mcp-tools.js";
|
|
29
32
|
import { evictAllEmbeddedSessionRunners, evictEmbeddedSessionRunner } from "./embedded/session-runner.js";
|
|
30
|
-
import { isValidSkillEnvVarName } from "./skills/required-env-vars.js";
|
|
31
|
-
import { loadSkillsLock } from "./skills/hub-lock.js";
|
|
32
|
-
import { isUnderManagedSkillsDir } from "./skills/managed-store.js";
|
|
33
33
|
import { UserContextCoordinator } from "./memory/user-context-coordinator.js";
|
|
34
34
|
import { WorkspaceRuntimeRegistry } from "./workspace-runtime/registry.js";
|
|
35
35
|
import { BackgroundReviewCoordinator } from "./background-review/coordinator.js";
|
|
@@ -262,6 +262,7 @@ var AgentManager = class {
|
|
|
262
262
|
for (const n of names) if (isValidSkillEnvVarName(n)) inst.skillEnvPassthroughKeys.add(n.trim());
|
|
263
263
|
},
|
|
264
264
|
installSkillFromSource: this.config.installSkillFromSource,
|
|
265
|
+
installSkillFromMarketplace: this.config.installSkillFromMarketplace,
|
|
265
266
|
getCodeIntelligenceRuntime: (workspace) => this.workspaceRuntimes.getOrCreate(workspace, resolveEffectiveAgentProfileForSession(this.config.config, this.config.getCurrentContext?.()?.sessionKey).agentId).codeIntelligence
|
|
266
267
|
};
|
|
267
268
|
}
|
|
@@ -113,7 +113,7 @@ export declare const AGENT_CAPABILITY_DEFINITIONS: readonly [{
|
|
|
113
113
|
readonly label: "Skill installation";
|
|
114
114
|
readonly description: "Find, install, and update xopc skills from explicit sources.";
|
|
115
115
|
readonly category: "authoring";
|
|
116
|
-
readonly tools: readonly ["skills_list", "skill_view", "skill_install"];
|
|
116
|
+
readonly tools: readonly ["skills_list", "skill_view", "skills_marketplace_search", "skill_install"];
|
|
117
117
|
readonly activation: {
|
|
118
118
|
readonly mode: "explicit";
|
|
119
119
|
readonly ttl: "turn";
|
|
@@ -121,6 +121,7 @@ export declare const AGENT_CAPABILITY_DEFINITIONS: readonly [{
|
|
|
121
121
|
readonly permissions: {
|
|
122
122
|
readonly writesFiles: true;
|
|
123
123
|
readonly usesNetwork: true;
|
|
124
|
+
readonly requiresConfirm: true;
|
|
124
125
|
};
|
|
125
126
|
}, {
|
|
126
127
|
readonly id: "visual-asset-authoring";
|
|
@@ -96,6 +96,7 @@ const AGENT_CAPABILITY_DEFINITIONS = [
|
|
|
96
96
|
tools: [
|
|
97
97
|
"skills_list",
|
|
98
98
|
"skill_view",
|
|
99
|
+
"skills_marketplace_search",
|
|
99
100
|
"skill_install"
|
|
100
101
|
],
|
|
101
102
|
activation: {
|
|
@@ -104,7 +105,8 @@ const AGENT_CAPABILITY_DEFINITIONS = [
|
|
|
104
105
|
},
|
|
105
106
|
permissions: {
|
|
106
107
|
writesFiles: true,
|
|
107
|
-
usesNetwork: true
|
|
108
|
+
usesNetwork: true,
|
|
109
|
+
requiresConfirm: true
|
|
108
110
|
}
|
|
109
111
|
},
|
|
110
112
|
{
|
|
@@ -31,6 +31,8 @@ const CORE_TOOL_ORDER = [
|
|
|
31
31
|
"skills_list",
|
|
32
32
|
"skill_view",
|
|
33
33
|
"skill_manage",
|
|
34
|
+
"skills_marketplace_search",
|
|
35
|
+
"skill_install",
|
|
34
36
|
"todo",
|
|
35
37
|
"clarify",
|
|
36
38
|
"text_to_speech",
|
|
@@ -71,6 +73,8 @@ const CORE_TOOL_SUMMARIES = {
|
|
|
71
73
|
skills_list: "List available skills",
|
|
72
74
|
skill_view: "Load a skill SKILL.md or sub-documents",
|
|
73
75
|
skill_manage: "Create or update skills on disk",
|
|
76
|
+
skills_marketplace_search: "Search and rank skills across Store, ClawHub, and skills.sh without installing",
|
|
77
|
+
skill_install: "Install a skill from an explicit Git, archive, file, or local source after confirmation",
|
|
74
78
|
todo: "Manage in-session todo items",
|
|
75
79
|
clarify: "Ask the user a blocking clarification question",
|
|
76
80
|
text_to_speech: "Send a standalone voice message",
|
|
@@ -10,7 +10,7 @@ import type { SkillMarkdownPreviewPayload } from './skills/types.js';
|
|
|
10
10
|
import type { AgentCapabilityCatalogEntry } from './capabilities/index.js';
|
|
11
11
|
import type { AgentServiceConfig, StreamHandle } from './service.types.js';
|
|
12
12
|
import { PersistentGoalService } from './goals/persistent-goal-service.js';
|
|
13
|
-
import type { SkillInstallToolOptions, SkillInstallToolResult } from './tools/skill-install-tool.js';
|
|
13
|
+
import type { SkillInstallToolOptions, SkillInstallToolResult, MarketplaceSkillInstallToolOptions, MarketplaceSkillInstallToolResult } from './tools/skill-install-tool.js';
|
|
14
14
|
import { type InboundAttachmentInput, type MediaRef } from '../channels/attachments/inbound-persist.js';
|
|
15
15
|
export type { AgentServiceConfig, AgentContext, StreamHandle } from './service.types.js';
|
|
16
16
|
export declare class AgentService {
|
|
@@ -114,6 +114,7 @@ export declare class AgentService {
|
|
|
114
114
|
getSkillMarkdownSource(skillName: string): SkillMarkdownPreviewPayload | null;
|
|
115
115
|
refreshSkillsAfterDiskChange(): void;
|
|
116
116
|
installSkillFromSource(opts: SkillInstallToolOptions): Promise<SkillInstallToolResult>;
|
|
117
|
+
installSkillFromMarketplace(opts: MarketplaceSkillInstallToolOptions): Promise<MarketplaceSkillInstallToolResult>;
|
|
117
118
|
refreshSkillsAfterSkillConfigChange(): void;
|
|
118
119
|
refreshActionTrustPolicy(): void;
|
|
119
120
|
refreshUserProfileContext(): void;
|
|
@@ -10,6 +10,8 @@ import { extractTextContent } from "./context/workspace.js";
|
|
|
10
10
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
11
11
|
import { getProjectForSession } from "../projects/workspace.js";
|
|
12
12
|
import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "./skills/workspace-skills-dir.js";
|
|
13
|
+
import { removeSkillsLockEntry } from "./skills/hub-lock.js";
|
|
14
|
+
import { installSkillFromZip } from "./skills/managed-store.js";
|
|
13
15
|
import { normalizeSkillInstallTarget } from "./skills/install-target.js";
|
|
14
16
|
import { onSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
15
17
|
import { persistInboundAttachments } from "../channels/attachments/inbound-persist.js";
|
|
@@ -246,6 +248,7 @@ var AgentService = class {
|
|
|
246
248
|
getWorkflowRunService: config.getWorkflowRunService,
|
|
247
249
|
onSkillsUpdated: config.onSkillsUpdated,
|
|
248
250
|
installSkillFromSource: (opts) => this.installSkillFromSource(opts),
|
|
251
|
+
installSkillFromMarketplace: (opts) => this.installSkillFromMarketplace(opts),
|
|
249
252
|
isWorkspaceTrusted: config.isWorkspaceTrusted,
|
|
250
253
|
getSelfVerifyPromptContext: (sessionKey, agentId) => [this.selfVerifyMiddleware.getPendingVerificationContext(sessionKey, agentId), this.turnDiffTracker.buildFinalGuardContext(sessionKey)].filter(Boolean).join("\n\n")
|
|
251
254
|
});
|
|
@@ -547,6 +550,29 @@ var AgentService = class {
|
|
|
547
550
|
target
|
|
548
551
|
};
|
|
549
552
|
}
|
|
553
|
+
async installSkillFromMarketplace(opts) {
|
|
554
|
+
const config = this.effectiveAppConfig();
|
|
555
|
+
const target = normalizeSkillInstallTarget(opts.target);
|
|
556
|
+
const workspace = (opts.sessionKey ? this.agentManager.getResolvedWorkspaceForSession(opts.sessionKey) : void 0) || this.workspaceDir;
|
|
557
|
+
const rootDir = target === "workspace" ? resolveWorkspaceSkillsDir(workspace) : void 0;
|
|
558
|
+
const lockPath = target === "workspace" ? resolveWorkspaceSkillsLockPath(workspace) : void 0;
|
|
559
|
+
const { downloadFromMarketplace } = await import("./skills/skills-marketplace.js");
|
|
560
|
+
const downloaded = await downloadFromMarketplace(config, opts.name, opts.version, opts.provider);
|
|
561
|
+
const result = installSkillFromZip(downloaded.buffer, {
|
|
562
|
+
skillId: downloaded.skillId,
|
|
563
|
+
overwrite: opts.force ?? false,
|
|
564
|
+
rootDir
|
|
565
|
+
});
|
|
566
|
+
removeSkillsLockEntry(result.skillId, lockPath);
|
|
567
|
+
this.refreshSkillsAfterDiskChange();
|
|
568
|
+
return {
|
|
569
|
+
...result,
|
|
570
|
+
provider: opts.provider,
|
|
571
|
+
name: opts.name,
|
|
572
|
+
version: downloaded.version,
|
|
573
|
+
target
|
|
574
|
+
};
|
|
575
|
+
}
|
|
550
576
|
refreshSkillsAfterSkillConfigChange() {
|
|
551
577
|
this.agentManager.refreshSkillsAfterSkillConfigChange();
|
|
552
578
|
}
|
|
@@ -8,8 +8,8 @@ import { basename, dirname, join, normalize, resolve, sep } from "node:path";
|
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
10
|
import { execFileSync } from "node:child_process";
|
|
11
|
-
import { fetch } from "undici";
|
|
12
11
|
import AdmZip from "adm-zip";
|
|
12
|
+
import { fetch } from "undici";
|
|
13
13
|
//#region src/agent/skills/hub-pull.ts
|
|
14
14
|
/**
|
|
15
15
|
* CLI / hub: install or update skills from git or archive (zip / tar.gz) into ~/.xopc/skills.
|
|
@@ -9,8 +9,8 @@ import { collectSkillInstallWarnings, formatScanSummary, scanSkillDirectory } fr
|
|
|
9
9
|
import { resolveWorkspaceSkillsDir } from "./workspace-skills-dir.js";
|
|
10
10
|
import { parseSkillToolConditions } from "./skill-tool-gating.js";
|
|
11
11
|
import { parseRequiredEnvVarNames } from "./required-env-vars.js";
|
|
12
|
-
import { formatSkillsForPrompt } from "./format-skills-prompt.js";
|
|
13
12
|
import { parseSkillMetadata } from "./parse-skill-metadata.js";
|
|
13
|
+
import { formatSkillsForPrompt } from "./format-skills-prompt.js";
|
|
14
14
|
import { SkillTestFramework, SkillTestRunner, formatTestResults, formatTestResultsJson, formatTestResultsTap } from "./test-framework.js";
|
|
15
15
|
import { basename, dirname, join, relative, sep } from "path";
|
|
16
16
|
import { existsSync, readFileSync, readdirSync } from "fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/agent/skills/install-target.ts
|
|
2
2
|
function normalizeSkillInstallTarget(value) {
|
|
3
|
-
return value === "
|
|
3
|
+
return value === "workspace" ? "workspace" : "global";
|
|
4
4
|
}
|
|
5
5
|
function isSkillInstallTarget(value) {
|
|
6
6
|
return value === "workspace" || value === "global";
|
|
@@ -2,4 +2,68 @@
|
|
|
2
2
|
* ClawHub (clawhub.ai) skills marketplace adapter.
|
|
3
3
|
*/
|
|
4
4
|
import type { SkillsMarketplaceAdapter } from '../../adapter.types.js';
|
|
5
|
+
export interface ClawHubSearchResultItem {
|
|
6
|
+
id?: string;
|
|
7
|
+
score?: number;
|
|
8
|
+
slug: string;
|
|
9
|
+
source?: string;
|
|
10
|
+
downloads?: number;
|
|
11
|
+
canonicalUrl?: string;
|
|
12
|
+
install?: {
|
|
13
|
+
kind?: string;
|
|
14
|
+
reference?: string;
|
|
15
|
+
sourceUrl?: string | null;
|
|
16
|
+
};
|
|
17
|
+
links?: {
|
|
18
|
+
canonical?: string | null;
|
|
19
|
+
source?: string | null;
|
|
20
|
+
};
|
|
21
|
+
sourceIdentity?: {
|
|
22
|
+
owner?: string | null;
|
|
23
|
+
repo?: string | null;
|
|
24
|
+
};
|
|
25
|
+
publisher?: {
|
|
26
|
+
handle?: string | null;
|
|
27
|
+
displayName?: string | null;
|
|
28
|
+
avatarUrl?: string | null;
|
|
29
|
+
};
|
|
30
|
+
metrics?: {
|
|
31
|
+
bookmarks?: number;
|
|
32
|
+
updatedAt?: number;
|
|
33
|
+
};
|
|
34
|
+
trust?: {
|
|
35
|
+
clawHubVerdict?: string | null;
|
|
36
|
+
installability?: string | null;
|
|
37
|
+
upstreamScanners?: Record<string, {
|
|
38
|
+
status?: string | null;
|
|
39
|
+
sourceCheckedAt?: string | null;
|
|
40
|
+
sourceUrl?: string | null;
|
|
41
|
+
}>;
|
|
42
|
+
};
|
|
43
|
+
native?: {
|
|
44
|
+
skill?: {
|
|
45
|
+
stats?: {
|
|
46
|
+
downloads?: number;
|
|
47
|
+
stars?: number;
|
|
48
|
+
};
|
|
49
|
+
tags?: Record<string, string>;
|
|
50
|
+
categories?: string[];
|
|
51
|
+
};
|
|
52
|
+
} | null;
|
|
53
|
+
displayName?: string;
|
|
54
|
+
summary?: string;
|
|
55
|
+
version?: string | null;
|
|
56
|
+
updatedAt?: number;
|
|
57
|
+
ownerHandle?: string;
|
|
58
|
+
owner?: {
|
|
59
|
+
handle: string;
|
|
60
|
+
displayName: string;
|
|
61
|
+
image: string | null;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export interface ClawHubSearchResponse {
|
|
65
|
+
results: ClawHubSearchResultItem[];
|
|
66
|
+
}
|
|
67
|
+
/** Public federated search used by the read-only marketplace discovery tool. */
|
|
68
|
+
export declare function searchClawHubFederatedSkills(query: string, limit?: number): Promise<ClawHubSearchResponse>;
|
|
5
69
|
export declare const clawHubMarketplaceAdapter: SkillsMarketplaceAdapter;
|
|
@@ -53,6 +53,10 @@ async function searchClawHubSkills(query, limit) {
|
|
|
53
53
|
assertOk(res, "search");
|
|
54
54
|
return await res.json();
|
|
55
55
|
}
|
|
56
|
+
/** Public federated search used by the read-only marketplace discovery tool. */
|
|
57
|
+
async function searchClawHubFederatedSkills(query, limit) {
|
|
58
|
+
return cachedSearchClawHubSkills(query, limit);
|
|
59
|
+
}
|
|
56
60
|
async function getClawHubSkillDetail(slug) {
|
|
57
61
|
const res = await clawHubFetch(`/api/v1/skills/${encodeURIComponent(slug.trim())}`);
|
|
58
62
|
assertOk(res, `skill detail [${slug}]`);
|
|
@@ -73,10 +77,15 @@ async function getClawHubSkillFileText(slug, filePath, version) {
|
|
|
73
77
|
const text = await res.text();
|
|
74
78
|
return text.length > MAX_CLAWHUB_FILE_BYTES ? text.slice(0, MAX_CLAWHUB_FILE_BYTES) : text;
|
|
75
79
|
}
|
|
76
|
-
async function downloadClawHubSkillZip(
|
|
77
|
-
const
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
+
async function downloadClawHubSkillZip(reference, version) {
|
|
81
|
+
const parts = reference.trim().replace(/^@/, "").split("/").filter(Boolean);
|
|
82
|
+
const ownerHandle = parts.length === 2 ? parts[0] : void 0;
|
|
83
|
+
const slug = parts.length === 2 ? parts[1] : parts.length === 1 ? parts[0] : "";
|
|
84
|
+
if (!isValidSkillId(slug) || ownerHandle && !isValidSkillId(ownerHandle)) throw new Error(`Invalid ClawHub install reference: ${reference}`);
|
|
85
|
+
const sp = new URLSearchParams({ slug });
|
|
86
|
+
if (ownerHandle) sp.set("ownerHandle", ownerHandle);
|
|
87
|
+
if (version?.trim()) sp.set("version", version.trim());
|
|
88
|
+
const url = `${resolveClawHubBaseUrl()}/api/v1/download?${sp.toString()}`;
|
|
80
89
|
const res = await fetch(url, { redirect: "follow" });
|
|
81
90
|
if (!res.ok) {
|
|
82
91
|
const body = await res.text().catch(() => "");
|
|
@@ -88,7 +97,8 @@ async function downloadClawHubSkillZip(slug, version) {
|
|
|
88
97
|
if (arrayBuf.byteLength > MAX_SKILL_ZIP_BYTES) throw new Error(`ClawHub download [${slug}] exceeds size limit (${arrayBuf.byteLength} > ${MAX_SKILL_ZIP_BYTES})`);
|
|
89
98
|
return {
|
|
90
99
|
buffer: Buffer.from(arrayBuf),
|
|
91
|
-
version: version?.trim() || "latest"
|
|
100
|
+
version: version?.trim() || "latest",
|
|
101
|
+
slug
|
|
92
102
|
};
|
|
93
103
|
}
|
|
94
104
|
function pickClawHubDocFilePath(files) {
|
|
@@ -192,20 +202,20 @@ function convertListItemToPackageItem(item) {
|
|
|
192
202
|
}
|
|
193
203
|
function convertSearchResultToPackageItem(item, enrichment) {
|
|
194
204
|
return {
|
|
195
|
-
id: item.slug,
|
|
205
|
+
id: item.id ?? item.install?.reference ?? item.slug,
|
|
196
206
|
name: item.displayName || item.slug,
|
|
197
207
|
type: "skill",
|
|
198
208
|
description: item.summary || "",
|
|
199
|
-
downloads: enrichment?.stats.downloads ?? 0,
|
|
209
|
+
downloads: item.downloads ?? item.native?.skill?.stats?.downloads ?? enrichment?.stats.downloads ?? 0,
|
|
200
210
|
author: {
|
|
201
|
-
username: item.owner?.handle ?? item.ownerHandle ?? "clawhub",
|
|
202
|
-
avatarUrl: item.owner?.image ?? null
|
|
211
|
+
username: item.publisher?.handle ?? item.sourceIdentity?.owner ?? item.owner?.handle ?? item.ownerHandle ?? "clawhub",
|
|
212
|
+
avatarUrl: item.publisher?.avatarUrl ?? item.owner?.image ?? null
|
|
203
213
|
},
|
|
204
214
|
latestVersion: item.version ?? enrichment?.latestVersion?.version ?? "1.0.0",
|
|
205
|
-
updatedAt: String(item.updatedAt),
|
|
206
|
-
categories: enrichment?.metadata?.os ?? [],
|
|
207
|
-
stars: enrichment?.stats.stars ?? 0,
|
|
208
|
-
sourceLabel: "ClawHub"
|
|
215
|
+
updatedAt: String(item.metrics?.updatedAt ?? item.updatedAt ?? ""),
|
|
216
|
+
categories: item.native?.skill?.categories ?? enrichment?.metadata?.os ?? [],
|
|
217
|
+
stars: item.native?.skill?.stats?.stars ?? item.metrics?.bookmarks ?? enrichment?.stats.stars ?? 0,
|
|
218
|
+
sourceLabel: item.source === "skills-sh" ? "skills.sh" : "ClawHub"
|
|
209
219
|
};
|
|
210
220
|
}
|
|
211
221
|
function mapSortParam(sort) {
|
|
@@ -230,7 +240,7 @@ const clawHubMarketplaceAdapter = {
|
|
|
230
240
|
if (searchResponse.status === "rejected") throw searchResponse.reason;
|
|
231
241
|
const enrichmentBySlug = /* @__PURE__ */ new Map();
|
|
232
242
|
if (listSettled.status === "fulfilled") for (const it of listSettled.value.items) enrichmentBySlug.set(it.slug, it);
|
|
233
|
-
let rows = searchResponse.value.results.map((r) => convertSearchResultToPackageItem(r, enrichmentBySlug.get(r.slug)));
|
|
243
|
+
let rows = searchResponse.value.results.filter((r) => !r.source || r.source === "clawhub").map((r) => convertSearchResultToPackageItem(r, enrichmentBySlug.get(r.slug)));
|
|
234
244
|
if (params.sort === "downloads") rows = [...rows].sort((a, b) => b.downloads - a.downloads);
|
|
235
245
|
else if (params.sort === "newest") rows = [...rows].sort((a, b) => Number(b.updatedAt) - Number(a.updatedAt));
|
|
236
246
|
const total = rows.length;
|
|
@@ -304,11 +314,10 @@ const clawHubMarketplaceAdapter = {
|
|
|
304
314
|
};
|
|
305
315
|
},
|
|
306
316
|
async downloadPackage(_config, packageName, version) {
|
|
307
|
-
const
|
|
308
|
-
const result = await downloadClawHubSkillZip(slug, version);
|
|
317
|
+
const result = await downloadClawHubSkillZip(packageName, version);
|
|
309
318
|
return {
|
|
310
319
|
buffer: result.buffer,
|
|
311
|
-
skillId:
|
|
320
|
+
skillId: result.slug,
|
|
312
321
|
version: result.version
|
|
313
322
|
};
|
|
314
323
|
}
|
|
@@ -318,4 +327,4 @@ registerMarketplaceAdapter({
|
|
|
318
327
|
displayName: "ClawHub"
|
|
319
328
|
});
|
|
320
329
|
//#endregion
|
|
321
|
-
export { clawHubMarketplaceAdapter };
|
|
330
|
+
export { clawHubMarketplaceAdapter, searchClawHubFederatedSkills };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { registerMarketplaceAdapter } from "../../registry.js";
|
|
2
|
-
import { downloadSkillZipBuffer, fetchMarketplacePackageDetail, listSkillPackages, resolveSkillZipDownloadUrl, resolveSkillsStoreBaseUrl, skillIdForMarketplaceInstall, verifyStoreArtifactSha256 } from "./store-api-client.js";
|
|
3
2
|
import { buildSkillMarkdownPreviewFromRaw } from "../../../skill-markdown-preview-from-raw.js";
|
|
3
|
+
import { downloadSkillZipBuffer, fetchMarketplacePackageDetail, listSkillPackages, resolveSkillZipDownloadUrl, resolveSkillsStoreBaseUrl, skillIdForMarketplaceInstall, verifyStoreArtifactSha256 } from "./store-api-client.js";
|
|
4
4
|
//#region src/agent/skills/marketplace/adapters/store/adapter.ts
|
|
5
5
|
const storeMarketplaceAdapter = {
|
|
6
6
|
id: "store",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MAX_SKILL_ZIP_BYTES, isValidSkillId } from "../../../managed-store.js";
|
|
2
1
|
import { MAX_EXTENSION_STORE_ZIP_BYTES } from "../../../../../extensions/store-zip-limits.js";
|
|
2
|
+
import { MAX_SKILL_ZIP_BYTES, isValidSkillId } from "../../../managed-store.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
//#region src/agent/skills/marketplace/adapters/store/store-api-client.ts
|
|
5
5
|
/**
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Config } from '../../../config/schema.js';
|
|
2
|
+
export declare const SKILL_MARKETPLACE_SEARCH_SOURCES: readonly ["store", "clawhub", "skills-sh"];
|
|
3
|
+
export type SkillsMarketplaceSearchSource = (typeof SKILL_MARKETPLACE_SEARCH_SOURCES)[number];
|
|
4
|
+
export interface SkillsMarketplaceSearchResult {
|
|
5
|
+
id: string;
|
|
6
|
+
provider: 'store' | 'clawhub';
|
|
7
|
+
source: SkillsMarketplaceSearchSource;
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
author: string;
|
|
11
|
+
downloads: number;
|
|
12
|
+
stars: number;
|
|
13
|
+
updatedAt: string | null;
|
|
14
|
+
canonicalUrl: string | null;
|
|
15
|
+
install: {
|
|
16
|
+
kind: string;
|
|
17
|
+
reference: string;
|
|
18
|
+
sourceUrl: string | null;
|
|
19
|
+
};
|
|
20
|
+
security: {
|
|
21
|
+
status: 'pass' | 'warn' | 'fail' | 'unknown';
|
|
22
|
+
scanners: Array<{
|
|
23
|
+
name: string;
|
|
24
|
+
status: 'pass' | 'warn' | 'fail' | 'unknown';
|
|
25
|
+
checkedAt: string | null;
|
|
26
|
+
url: string | null;
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
29
|
+
valueScore: number;
|
|
30
|
+
}
|
|
31
|
+
export interface SkillMarketplaceSourceStatus {
|
|
32
|
+
source: SkillsMarketplaceSearchSource;
|
|
33
|
+
ok: boolean;
|
|
34
|
+
count: number;
|
|
35
|
+
via?: 'clawhub';
|
|
36
|
+
error?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function searchSkillMarketplaces(params: {
|
|
39
|
+
config: Config;
|
|
40
|
+
query: string;
|
|
41
|
+
sources?: SkillsMarketplaceSearchSource[];
|
|
42
|
+
limit?: number;
|
|
43
|
+
}): Promise<{
|
|
44
|
+
results: SkillsMarketplaceSearchResult[];
|
|
45
|
+
sources: SkillMarketplaceSourceStatus[];
|
|
46
|
+
}>;
|