happy2 0.0.13 → 0.0.14
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/package.json +1 -1
- package/packages/happy2-server/PLUGINS.md +196 -42
- package/packages/happy2-server/dist/index.d.ts +1 -0
- package/packages/happy2-server/dist/index.d.ts.map +1 -1
- package/packages/happy2-server/dist/index.js +1 -0
- package/packages/happy2-server/dist/index.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSkillHomeGet.d.ts +4 -0
- package/packages/happy2-server/dist/modules/agent/agentSkillHomeGet.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agent/agentSkillHomeGet.js +15 -0
- package/packages/happy2-server/dist/modules/agent/agentSkillHomeGet.js.map +1 -0
- package/packages/happy2-server/dist/modules/agent/agentSkillHomeGet.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/agent/agentSkillHomeGet.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agent/agentSkillHomeGet.test.js +17 -0
- package/packages/happy2-server/dist/modules/agent/agentSkillHomeGet.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/agent/agentTurnGetPluginContext.d.ts +23 -0
- package/packages/happy2-server/dist/modules/agent/agentTurnGetPluginContext.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agent/agentTurnGetPluginContext.js +70 -0
- package/packages/happy2-server/dist/modules/agent/agentTurnGetPluginContext.js.map +1 -0
- package/packages/happy2-server/dist/modules/agents/service.d.ts +2 -4
- package/packages/happy2-server/dist/modules/agents/service.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agents/service.js +7 -7
- package/packages/happy2-server/dist/modules/agents/service.js.map +1 -1
- package/packages/happy2-server/dist/modules/auth/tokens.d.ts +15 -0
- package/packages/happy2-server/dist/modules/auth/tokens.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/auth/tokens.js +74 -6
- package/packages/happy2-server/dist/modules/auth/tokens.js.map +1 -1
- package/packages/happy2-server/dist/modules/auth/tokens.test.js +57 -0
- package/packages/happy2-server/dist/modules/auth/tokens.test.js.map +1 -1
- package/packages/happy2-server/dist/modules/chat/channelCreateWithMembers.d.ts +19 -0
- package/packages/happy2-server/dist/modules/chat/channelCreateWithMembers.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/chat/channelCreateWithMembers.js +87 -0
- package/packages/happy2-server/dist/modules/chat/channelCreateWithMembers.js.map +1 -0
- package/packages/happy2-server/dist/modules/chat/channelMembersUpdate.d.ts +15 -0
- package/packages/happy2-server/dist/modules/chat/channelMembersUpdate.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/chat/channelMembersUpdate.js +38 -0
- package/packages/happy2-server/dist/modules/chat/channelMembersUpdate.js.map +1 -0
- package/packages/happy2-server/dist/modules/chat/chatAppendAudit.d.ts +1 -1
- package/packages/happy2-server/dist/modules/chat/chatAppendAudit.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/catalog.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/catalog.js +3 -3
- package/packages/happy2-server/dist/modules/plugin/catalog.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/catalog.test.js +2 -2
- package/packages/happy2-server/dist/modules/plugin/catalog.test.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/impl/apiPermissions.d.ts +5 -0
- package/packages/happy2-server/dist/modules/plugin/impl/apiPermissions.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/apiPermissions.js +106 -0
- package/packages/happy2-server/dist/modules/plugin/impl/apiPermissions.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/asInstallation.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/impl/asInstallation.js +10 -1
- package/packages/happy2-server/dist/modules/plugin/impl/asInstallation.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/impl/asManagementRequest.d.ts +3 -0
- package/packages/happy2-server/dist/modules/plugin/impl/asManagementRequest.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/asManagementRequest.js +68 -0
- package/packages/happy2-server/dist/modules/plugin/impl/asManagementRequest.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/asPlugin.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/impl/asPlugin.js +10 -2
- package/packages/happy2-server/dist/modules/plugin/impl/asPlugin.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/impl/installationSelection.d.ts +19 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installationSelection.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/impl/installationSelection.js +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installationSelection.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.js +4 -2
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.test.js +14 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.test.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/impl/managementRequestSelection.d.ts +345 -0
- package/packages/happy2-server/dist/modules/plugin/impl/managementRequestSelection.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/managementRequestSelection.js +22 -0
- package/packages/happy2-server/dist/modules/plugin/impl/managementRequestSelection.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/packageLinkDownloader.d.ts +16 -0
- package/packages/happy2-server/dist/modules/plugin/packageLinkDownloader.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/packageLinkDownloader.js +67 -0
- package/packages/happy2-server/dist/modules/plugin/packageLinkDownloader.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/packageStore.d.ts +14 -1
- package/packages/happy2-server/dist/modules/plugin/packageStore.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/packageStore.js +112 -1
- package/packages/happy2-server/dist/modules/plugin/packageStore.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/packageStore.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/plugin/packageStore.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/packageStore.test.js +50 -0
- package/packages/happy2-server/dist/modules/plugin/packageStore.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginAgentCallContextGet.d.ts +5 -0
- package/packages/happy2-server/dist/modules/plugin/pluginAgentCallContextGet.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginAgentCallContextGet.js +26 -0
- package/packages/happy2-server/dist/modules/plugin/pluginAgentCallContextGet.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginCatalogList.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginCatalogList.js +7 -3
- package/packages/happy2-server/dist/modules/plugin/pluginCatalogList.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginDeveloperServer.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/plugin/pluginDeveloperServer.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginDeveloperServer.test.js +44 -0
- package/packages/happy2-server/dist/modules/plugin/pluginDeveloperServer.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstall.d.ts +4 -2
- package/packages/happy2-server/dist/modules/plugin/pluginInstall.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginInstall.js +19 -2
- package/packages/happy2-server/dist/modules/plugin/pluginInstall.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetContainerName.d.ts +7 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetContainerName.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetContainerName.js +18 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetContainerName.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRequestUninstallContext.d.ts +13 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRequestUninstallContext.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRequestUninstallContext.js +35 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRequestUninstallContext.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.js +3 -1
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetUninstallContext.d.ts +6 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetUninstallContext.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetUninstallContext.js +17 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetUninstallContext.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationPermissionsUpdate.d.ts +18 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationPermissionsUpdate.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationPermissionsUpdate.js +92 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationPermissionsUpdate.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationUninstall.d.ts +16 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationUninstall.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationUninstall.js +71 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationUninstall.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestBeginInstall.d.ts +21 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestBeginInstall.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestBeginInstall.js +71 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestBeginInstall.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestBeginUninstall.d.ts +12 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestBeginUninstall.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestBeginUninstall.js +56 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestBeginUninstall.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCompleteInstall.d.ts +11 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCompleteInstall.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCompleteInstall.js +44 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCompleteInstall.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCompleteUninstall.d.ts +10 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCompleteUninstall.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCompleteUninstall.js +41 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCompleteUninstall.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCreateInstall.d.ts +26 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCreateInstall.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCreateInstall.js +78 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCreateInstall.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCreateUninstall.d.ts +25 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCreateUninstall.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCreateUninstall.js +76 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestCreateUninstall.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestDeny.d.ts +11 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestDeny.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestDeny.js +48 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestDeny.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestGetPackage.d.ts +12 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestGetPackage.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestGetPackage.js +42 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestGetPackage.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestList.d.ts +5 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestList.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestList.js +18 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestList.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestListTerminalIds.d.ts +4 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestListTerminalIds.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestListTerminalIds.js +11 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestListTerminalIds.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestRecoverProcessing.d.ts +5 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestRecoverProcessing.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestRecoverProcessing.js +75 -0
- package/packages/happy2-server/dist/modules/plugin/pluginManagementRequestRecoverProcessing.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginSkillPackageListReady.d.ts +12 -0
- package/packages/happy2-server/dist/modules/plugin/pluginSkillPackageListReady.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginSkillPackageListReady.js +33 -0
- package/packages/happy2-server/dist/modules/plugin/pluginSkillPackageListReady.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/service.d.ts +108 -7
- package/packages/happy2-server/dist/modules/plugin/service.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/service.js +463 -26
- package/packages/happy2-server/dist/modules/plugin/service.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/types.d.ts +75 -9
- package/packages/happy2-server/dist/modules/plugin/types.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/types.js +9 -0
- package/packages/happy2-server/dist/modules/plugin/types.js.map +1 -1
- package/packages/happy2-server/dist/modules/schema.d.ts +4224 -3264
- package/packages/happy2-server/dist/modules/schema.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/schema.js +35 -0
- package/packages/happy2-server/dist/modules/schema.js.map +1 -1
- package/packages/happy2-server/dist/routes/pluginHost.d.ts +2 -1
- package/packages/happy2-server/dist/routes/pluginHost.d.ts.map +1 -1
- package/packages/happy2-server/dist/routes/pluginHost.js +288 -6
- package/packages/happy2-server/dist/routes/pluginHost.js.map +1 -1
- package/packages/happy2-server/dist/routes/plugins.d.ts.map +1 -1
- package/packages/happy2-server/dist/routes/plugins.js +229 -3
- package/packages/happy2-server/dist/routes/plugins.js.map +1 -1
- package/packages/happy2-server/dist/server.d.ts +2 -0
- package/packages/happy2-server/dist/server.d.ts.map +1 -1
- package/packages/happy2-server/dist/server.js +9 -7
- package/packages/happy2-server/dist/server.js.map +1 -1
- package/packages/happy2-server/dist/web/assets/index-Dn5SZu3y.js +39 -0
- package/packages/happy2-server/dist/web/assets/{index-BaPUPGPe.css → index-Dys3sWv8.css} +1 -1
- package/packages/happy2-server/dist/web/index.html +2 -2
- package/packages/happy2-server/drizzle/0028_plugin_api_permissions.sql +1 -0
- package/packages/happy2-server/drizzle/0029_plugin_management_requests.sql +35 -0
- package/packages/happy2-server/drizzle/meta/_journal.json +14 -0
- package/packages/happy2-server/plugins/README.md +7 -3
- package/packages/happy2-server/plugins/chat-management/plugin.json +3 -3
- package/packages/happy2-server/plugins/chat-management/server.mjs +184 -17
- package/packages/happy2-server/plugins/plugin-developer/container/Dockerfile +6 -0
- package/packages/happy2-server/plugins/plugin-developer/plugin.json +17 -0
- package/packages/happy2-server/plugins/plugin-developer/plugin.png +0 -0
- package/packages/happy2-server/plugins/plugin-developer/server.mjs +155 -0
- package/packages/happy2-server/plugins/plugin-developer/skills/happy2-plugin-development/SKILL.md +59 -0
- package/packages/happy2-server/plugins/plugin-developer/skills/happy2-plugin-development/references/host-api.md +63 -0
- package/packages/happy2-server/plugins/plugin-developer/skills/happy2-plugin-development/references/installing.md +86 -0
- package/packages/happy2-server/plugins/plugin-developer/skills/happy2-plugin-development/references/package-format.md +137 -0
- package/packages/happy2-server/dist/modules/agent/agentChatGetIdBySession.d.ts +0 -7
- package/packages/happy2-server/dist/modules/agent/agentChatGetIdBySession.d.ts.map +0 -1
- package/packages/happy2-server/dist/modules/agent/agentChatGetIdBySession.js +0 -15
- package/packages/happy2-server/dist/modules/agent/agentChatGetIdBySession.js.map +0 -1
- package/packages/happy2-server/dist/web/assets/index-BnhFxR3U.js +0 -39
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Packaging, installation, and removal
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
1. Create the ZIP
|
|
6
|
+
2. Direct ZIP install
|
|
7
|
+
3. Direct HTTPS-link install
|
|
8
|
+
4. Chat approval install
|
|
9
|
+
5. Health and listing
|
|
10
|
+
6. Uninstall
|
|
11
|
+
7. Version changes
|
|
12
|
+
|
|
13
|
+
## Create the ZIP
|
|
14
|
+
|
|
15
|
+
From the parent of `my-plugin/`:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
zip -r my-plugin.zip my-plugin \
|
|
19
|
+
-x '*/node_modules/*' '*/.git/*' '*/.DS_Store'
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Happy2 accepts either package files at the archive root or exactly one top-level directory containing `plugin.json`. Do not include symlinks, secrets, build caches, sockets, device nodes, or unrelated project files.
|
|
23
|
+
|
|
24
|
+
## Direct ZIP install
|
|
25
|
+
|
|
26
|
+
An authenticated server administrator posts multipart form data:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
curl -X POST "$HAPPY2_URL/v0/admin/plugins/installPlugin" \
|
|
30
|
+
-H "Authorization: Bearer $HAPPY2_TOKEN" \
|
|
31
|
+
-F "archive=@my-plugin.zip;type=application/zip" \
|
|
32
|
+
-F 'variables={}'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
For declared variables, supply one JSON object. For a plugin without a bundled local image, also supply `containerImageId` as a multipart field.
|
|
36
|
+
|
|
37
|
+
## Direct HTTPS-link install
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
curl -X POST "$HAPPY2_URL/v0/admin/plugins/installPlugin" \
|
|
41
|
+
-H "Authorization: Bearer $HAPPY2_TOKEN" \
|
|
42
|
+
-H "Content-Type: application/json" \
|
|
43
|
+
--data '{
|
|
44
|
+
"sourceUrl": "https://downloads.example.com/my-plugin.zip",
|
|
45
|
+
"variables": {}
|
|
46
|
+
}'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Happy2 accepts public HTTPS on approved ports, rejects credentials/fragments/private destinations, revalidates redirects, pins DNS, caps the response at 20 MiB, validates the ZIP, and snapshots the exact package.
|
|
50
|
+
|
|
51
|
+
## Chat approval install
|
|
52
|
+
|
|
53
|
+
Use the `happy2_plugin_install_from_link` MCP tool when the user wants the agent to install a public linked package. Provide the URL and a concise reason. Happy2 downloads and validates first, then records the validated icon, name, description, source, digest, requesting plugin, agent, originating human, Rig call, and chat.
|
|
54
|
+
|
|
55
|
+
The tool returns after posting a pending request. It does not wait and does not install. A chat-member server administrator approves or denies the durable card. Approval installs the staged immutable bytes with a predetermined installation ID; denial leaves no running plugin.
|
|
56
|
+
|
|
57
|
+
Chat installation rejects packages needing variables or an administrator-selected image. Direct the user to the administrator form for those packages; never solicit secrets in chat.
|
|
58
|
+
|
|
59
|
+
## Health and listing
|
|
60
|
+
|
|
61
|
+
An accepted install returns HTTP 202 with an installation. Runtime work continues asynchronously through `preparing`, `starting`, and `ready`, or ends in `broken_configuration` or `failed` with bounded details.
|
|
62
|
+
|
|
63
|
+
Use the `happy2_plugins_list` tool from the developer plugin, or call:
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
curl "$HAPPY2_URL/v0/admin/systemPlugins" \
|
|
67
|
+
-H "Authorization: Bearer $HAPPY2_TOKEN"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
One durable system plugin may have multiple independent installations. Use installation IDs—not short names—when inspecting health or removing an instance.
|
|
71
|
+
|
|
72
|
+
## Uninstall
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
curl -X POST \
|
|
76
|
+
"$HAPPY2_URL/v0/admin/pluginInstallations/INSTALLATION_ID/uninstallPlugin" \
|
|
77
|
+
-H "Authorization: Bearer $HAPPY2_TOKEN" \
|
|
78
|
+
-H "Content-Type: application/json" \
|
|
79
|
+
--data '{}'
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Uninstall stops and removes that installation's runtime, encrypted variables, cached MCP tools, and durable installation. When it was the final installation, Happy2 also removes the system-plugin row and private package/image snapshot. Other installations remain intact.
|
|
83
|
+
|
|
84
|
+
## Version changes
|
|
85
|
+
|
|
86
|
+
Installed bytes are immutable. Reusing the same source installs another instance of the stored system package. A built-in catalog digest change is reported as `updateAvailable`; it does not silently mutate existing installations. If a different source tries to claim an installed short name, Happy2 rejects the collision. Publish intentional version changes as explicit package/update work, not by replacing bytes behind a stable URL and assuming they will be adopted.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Happy2 package format
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
1. Package tree
|
|
6
|
+
2. Manifest fields
|
|
7
|
+
3. Skills
|
|
8
|
+
4. Local containers and stdio MCP
|
|
9
|
+
5. Remote MCP
|
|
10
|
+
6. Variables and permissions
|
|
11
|
+
7. Validation limits
|
|
12
|
+
|
|
13
|
+
## Package tree
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
my-plugin/
|
|
17
|
+
├── plugin.json
|
|
18
|
+
├── plugin.png
|
|
19
|
+
├── server.mjs # optional
|
|
20
|
+
├── container/
|
|
21
|
+
│ └── Dockerfile # optional
|
|
22
|
+
└── skills/
|
|
23
|
+
└── my-plugin-workflow/
|
|
24
|
+
├── SKILL.md
|
|
25
|
+
├── references/ # optional
|
|
26
|
+
├── scripts/ # optional
|
|
27
|
+
└── assets/ # optional
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`plugin.png` is required, must be PNG, must be square, and may be at most 4096×4096. Happy2 records its dimensions, bytes, SHA-256 checksum, and thumbhash, then keeps the exact image in the immutable installed snapshot.
|
|
31
|
+
|
|
32
|
+
The entire package may contain at most 1,000 files and 20 MiB uncompressed. One file may be at most 5 MiB. Symlinks and non-files are rejected.
|
|
33
|
+
|
|
34
|
+
## Manifest fields
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"schemaVersion": 1,
|
|
39
|
+
"version": "1.2.3",
|
|
40
|
+
"displayName": "Project Search",
|
|
41
|
+
"shortName": "project-search",
|
|
42
|
+
"description": "Searches project source and documentation.",
|
|
43
|
+
"variables": []
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
- `schemaVersion` must be `1`.
|
|
48
|
+
- `version` must be strict SemVer.
|
|
49
|
+
- `shortName` is lower-case kebab-case and at most 64 characters. It must match a built-in package directory; an uploaded/downloaded ZIP may use any enclosing folder name.
|
|
50
|
+
- `displayName` is at most 100 characters.
|
|
51
|
+
- `description` is at most 1,000 characters.
|
|
52
|
+
- `variables` defaults conceptually to none, but write the explicit array.
|
|
53
|
+
- A package must contain at least one discovered skill, `container`, or `mcp`.
|
|
54
|
+
- Unknown manifest fields are rejected.
|
|
55
|
+
|
|
56
|
+
## Skills
|
|
57
|
+
|
|
58
|
+
Every direct child of `skills/` is one Agent Skill. It must contain `SKILL.md` with YAML frontmatter:
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
---
|
|
62
|
+
name: project-search
|
|
63
|
+
description: Search this project's indexed source and docs. Use when an agent needs to locate code, symbols, or design documentation.
|
|
64
|
+
---
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The name matches the skill directory and uses lower-case kebab-case. Put detailed material in one-level `references/` files and deterministic reusable helpers in `scripts/`. Do not make the core skill a dump of material the agent rarely needs.
|
|
68
|
+
|
|
69
|
+
## Local containers and stdio MCP
|
|
70
|
+
|
|
71
|
+
Bundled runtime:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"container": {
|
|
76
|
+
"dockerfile": "container/Dockerfile",
|
|
77
|
+
"command": "/plugin/bin/indexer",
|
|
78
|
+
"args": ["--watch"],
|
|
79
|
+
"permissions": ["plugins:list"]
|
|
80
|
+
},
|
|
81
|
+
"mcp": {
|
|
82
|
+
"type": "stdio",
|
|
83
|
+
"command": "node",
|
|
84
|
+
"args": ["/plugin/server.mjs"]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The optional persistent `container.command` and each stdio MCP process run in the same dedicated installation container. The image root is read-only at runtime. `/tmp` and `/run` are ephemeral and writable. `HOME`, `TMPDIR`, and the working directory are `/tmp`.
|
|
90
|
+
|
|
91
|
+
If a stdio MCP is the only local component, older manifests may put a bundled Dockerfile under `mcp.container`; new packages should use `container.dockerfile` so one container definition owns permissions and both processes.
|
|
92
|
+
|
|
93
|
+
Without `container.dockerfile`, direct installation must provide a ready Happy2 agent-image ID. Chat-requested installation intentionally rejects that package because an administrator must make the image choice.
|
|
94
|
+
|
|
95
|
+
## Remote MCP
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"variables": [
|
|
100
|
+
{
|
|
101
|
+
"key": "PROJECT_TOKEN",
|
|
102
|
+
"displayName": "API token",
|
|
103
|
+
"description": "Token sent to the project MCP server.",
|
|
104
|
+
"kind": "secret"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"mcp": {
|
|
108
|
+
"type": "remote",
|
|
109
|
+
"url": "https://mcp.example.com/mcp",
|
|
110
|
+
"headers": {
|
|
111
|
+
"Authorization": "Bearer ${PROJECT_TOKEN}"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Remote URLs are public HTTPS URLs without embedded credentials or fragments. Happy2 resolves and pins public addresses to prevent DNS rebinding. Header templates may reference only declared variables; every remote variable must be used. Hop-by-hop, proxy, host, content, MCP protocol, and other Happy-managed headers are reserved.
|
|
118
|
+
|
|
119
|
+
Remote MCP cannot share a local plugin container. OAuth is not part of schema version 1.
|
|
120
|
+
|
|
121
|
+
## Variables and permissions
|
|
122
|
+
|
|
123
|
+
Variable keys use environment-variable syntax. Each installation must provide every declared variable and no extra keys. Use `secret` for credentials and `text` for non-secret configuration. Values must be non-empty and no larger than 64 KiB.
|
|
124
|
+
|
|
125
|
+
Supported local host permissions:
|
|
126
|
+
|
|
127
|
+
- `plugins:list`: read non-secret installed-plugin identity and health.
|
|
128
|
+
- `plugins:request-install`: during a contextual agent tool call, stage a linked ZIP and create a durable approval in that exact chat.
|
|
129
|
+
- `plugins:request-uninstall`: during a contextual agent tool call, create a durable approval to remove one exact installation.
|
|
130
|
+
|
|
131
|
+
The host API is capability-only and separate from the product API. It exposes neither user sessions nor arbitrary server routes.
|
|
132
|
+
|
|
133
|
+
## Validation limits
|
|
134
|
+
|
|
135
|
+
Happy2 rejects unsafe relative paths, missing referenced Dockerfiles, malformed skill frontmatter, duplicate skill names, invalid SemVer, duplicate variables/permissions, unsupported fields, non-square icons, oversized packages, and packages with no functional component.
|
|
136
|
+
|
|
137
|
+
The installed package digest covers every relative filename, byte length, and byte. Container image tags are content-addressed from that digest. Mutating source files later does not mutate a durable installation.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DrizzleExecutor } from "../drizzle.js";
|
|
2
|
-
/**
|
|
3
|
-
* Resolves the one current chat bound to a Rig session so agent-originated capabilities cannot be detached from their durable conversation.
|
|
4
|
-
* Returning no ID for missing or ambiguous bindings prevents an external tool call from receiving authority over an inferred chat.
|
|
5
|
-
*/
|
|
6
|
-
export declare function agentChatGetIdBySession(executor: DrizzleExecutor, sessionId: string): Promise<string | undefined>;
|
|
7
|
-
//# sourceMappingURL=agentChatGetIdBySession.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agentChatGetIdBySession.d.ts","sourceRoot":"","sources":["../../../sources/modules/agent/agentChatGetIdBySession.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD;;;GAGG;AACH,wBAAsB,uBAAuB,CACzC,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAO7B"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { eq } from "drizzle-orm";
|
|
2
|
-
import { agentRigBindings } from "../schema.js";
|
|
3
|
-
/**
|
|
4
|
-
* Resolves the one current chat bound to a Rig session so agent-originated capabilities cannot be detached from their durable conversation.
|
|
5
|
-
* Returning no ID for missing or ambiguous bindings prevents an external tool call from receiving authority over an inferred chat.
|
|
6
|
-
*/
|
|
7
|
-
export async function agentChatGetIdBySession(executor, sessionId) {
|
|
8
|
-
const rows = await executor
|
|
9
|
-
.select({ chatId: agentRigBindings.chatId })
|
|
10
|
-
.from(agentRigBindings)
|
|
11
|
-
.where(eq(agentRigBindings.sessionId, sessionId))
|
|
12
|
-
.limit(2);
|
|
13
|
-
return rows.length === 1 ? rows[0].chatId : undefined;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=agentChatGetIdBySession.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agentChatGetIdBySession.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentChatGetIdBySession.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CACzC,QAAyB,EACzB,SAAiB;IAEjB,MAAM,IAAI,GAAG,MAAM,QAAQ;SACtB,MAAM,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,MAAM,EAAE,CAAC;SAC3C,IAAI,CAAC,gBAAgB,CAAC;SACtB,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;SAChD,KAAK,CAAC,CAAC,CAAC,CAAC;IACd,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3D,CAAC"}
|