happy2 0.0.12 → 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 +2 -2
- package/packages/happy2-server/PLUGINS.md +281 -39
- package/packages/happy2-server/README.md +8 -7
- package/packages/happy2-server/dist/index.d.ts +3 -1
- package/packages/happy2-server/dist/index.d.ts.map +1 -1
- package/packages/happy2-server/dist/index.js +2 -0
- package/packages/happy2-server/dist/index.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentChatBind.d.ts +1 -0
- package/packages/happy2-server/dist/modules/agent/agentChatBind.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentChatBind.js +4 -0
- package/packages/happy2-server/dist/modules/agent/agentChatBind.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentChatGetContext.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentChatGetContext.js +3 -1
- package/packages/happy2-server/dist/modules/agent/agentChatGetContext.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentCreate.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentCreate.js +1 -0
- package/packages/happy2-server/dist/modules/agent/agentCreate.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentEffortBindingList.d.ts +4 -2
- package/packages/happy2-server/dist/modules/agent/agentEffortBindingList.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentEffortBindingList.js +8 -8
- package/packages/happy2-server/dist/modules/agent/agentEffortBindingList.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentEffortGetContext.d.ts +3 -3
- package/packages/happy2-server/dist/modules/agent/agentEffortGetContext.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentEffortGetContext.js +4 -4
- package/packages/happy2-server/dist/modules/agent/agentEffortGetContext.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentEffortUpdate.d.ts +4 -4
- package/packages/happy2-server/dist/modules/agent/agentEffortUpdate.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentEffortUpdate.js +57 -41
- package/packages/happy2-server/dist/modules/agent/agentEffortUpdate.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentImageCommitChange.d.ts +1 -1
- package/packages/happy2-server/dist/modules/agent/agentImageCommitChange.js +3 -3
- package/packages/happy2-server/dist/modules/agent/agentImageCommitChange.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentImageCreate.d.ts +1 -1
- package/packages/happy2-server/dist/modules/agent/agentImageCreate.js +3 -3
- package/packages/happy2-server/dist/modules/agent/agentImageCreate.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentImageGet.d.ts +1 -1
- package/packages/happy2-server/dist/modules/agent/agentImageGet.js +3 -3
- package/packages/happy2-server/dist/modules/agent/agentImageGet.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentImageGetChangeContext.d.ts +2 -1
- package/packages/happy2-server/dist/modules/agent/agentImageGetChangeContext.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentImageGetChangeContext.js +11 -4
- package/packages/happy2-server/dist/modules/agent/agentImageGetChangeContext.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentImageList.d.ts +2 -2
- package/packages/happy2-server/dist/modules/agent/agentImageList.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentImageList.js +8 -4
- package/packages/happy2-server/dist/modules/agent/agentImageList.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentImageRequestBuild.d.ts +1 -1
- package/packages/happy2-server/dist/modules/agent/agentImageRequestBuild.js +3 -3
- package/packages/happy2-server/dist/modules/agent/agentImageRequestBuild.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentImageSetDefault.d.ts +1 -1
- package/packages/happy2-server/dist/modules/agent/agentImageSetDefault.js +3 -3
- package/packages/happy2-server/dist/modules/agent/agentImageSetDefault.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSecretAssignmentDelete.d.ts +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSecretAssignmentDelete.js +3 -3
- package/packages/happy2-server/dist/modules/agent/agentSecretAssignmentDelete.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSecretAssignmentList.d.ts +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSecretAssignmentList.js +3 -3
- package/packages/happy2-server/dist/modules/agent/agentSecretAssignmentList.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSecretAttachToAgent.d.ts +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSecretAttachToAgent.js +3 -3
- package/packages/happy2-server/dist/modules/agent/agentSecretAttachToAgent.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSecretAttachToChannel.d.ts +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSecretAttachToChannel.js +3 -3
- package/packages/happy2-server/dist/modules/agent/agentSecretAttachToChannel.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSecretAuthorizeManagement.d.ts +4 -3
- package/packages/happy2-server/dist/modules/agent/agentSecretAuthorizeManagement.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSecretAuthorizeManagement.js +5 -5
- package/packages/happy2-server/dist/modules/agent/agentSecretAuthorizeManagement.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSecretDetachFromAgent.d.ts +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSecretDetachFromAgent.js +3 -3
- package/packages/happy2-server/dist/modules/agent/agentSecretDetachFromAgent.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSecretDetachFromChannel.d.ts +2 -2
- package/packages/happy2-server/dist/modules/agent/agentSecretDetachFromChannel.js +4 -4
- package/packages/happy2-server/dist/modules/agent/agentSecretDetachFromChannel.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSecretRecordRegistration.d.ts +1 -1
- package/packages/happy2-server/dist/modules/agent/agentSecretRecordRegistration.js +3 -3
- package/packages/happy2-server/dist/modules/agent/agentSecretRecordRegistration.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/agent/agentTurnStreamReply.d.ts +4 -0
- package/packages/happy2-server/dist/modules/agent/agentTurnStreamReply.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentTurnStreamReply.js +207 -9
- package/packages/happy2-server/dist/modules/agent/agentTurnStreamReply.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/agentTurnTraceGet.d.ts +8 -0
- package/packages/happy2-server/dist/modules/agent/agentTurnTraceGet.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agent/agentTurnTraceGet.js +86 -0
- package/packages/happy2-server/dist/modules/agent/agentTurnTraceGet.js.map +1 -0
- package/packages/happy2-server/dist/modules/agent/agentTurnTraceStart.d.ts +19 -0
- package/packages/happy2-server/dist/modules/agent/agentTurnTraceStart.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agent/agentTurnTraceStart.js +87 -0
- package/packages/happy2-server/dist/modules/agent/agentTurnTraceStart.js.map +1 -0
- package/packages/happy2-server/dist/modules/agent/impl/agentChatContext.d.ts +2 -1
- package/packages/happy2-server/dist/modules/agent/impl/agentChatContext.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agent/impl/agentEffortContext.d.ts +4 -1
- package/packages/happy2-server/dist/modules/agent/impl/agentEffortContext.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agent/impl/agentEffortContextDb.d.ts +3 -3
- package/packages/happy2-server/dist/modules/agent/impl/agentEffortContextDb.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agent/impl/agentEffortContextDb.js +26 -40
- package/packages/happy2-server/dist/modules/agent/impl/agentEffortContextDb.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/impl/finishAgentTurn.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agent/impl/finishAgentTurn.js +63 -2
- package/packages/happy2-server/dist/modules/agent/impl/finishAgentTurn.js.map +1 -1
- package/packages/happy2-server/dist/modules/agent/types.d.ts +53 -0
- package/packages/happy2-server/dist/modules/agent/types.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agents/daemon.d.ts +31 -2
- package/packages/happy2-server/dist/modules/agents/daemon.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agents/daemon.js +12 -2
- package/packages/happy2-server/dist/modules/agents/daemon.js.map +1 -1
- package/packages/happy2-server/dist/modules/agents/service.d.ts +11 -6
- package/packages/happy2-server/dist/modules/agents/service.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agents/service.js +498 -50
- package/packages/happy2-server/dist/modules/agents/service.js.map +1 -1
- package/packages/happy2-server/dist/modules/auth/developmentTokenCreate.d.ts +12 -0
- package/packages/happy2-server/dist/modules/auth/developmentTokenCreate.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/developmentTokenCreate.js +27 -0
- package/packages/happy2-server/dist/modules/auth/developmentTokenCreate.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/developmentTokenFindActive.d.ts +8 -0
- package/packages/happy2-server/dist/modules/auth/developmentTokenFindActive.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/developmentTokenFindActive.js +22 -0
- package/packages/happy2-server/dist/modules/auth/developmentTokenFindActive.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/methods.d.ts +1 -0
- package/packages/happy2-server/dist/modules/auth/methods.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/auth/methods.js +10 -6
- package/packages/happy2-server/dist/modules/auth/methods.js.map +1 -1
- package/packages/happy2-server/dist/modules/auth/service.d.ts +2 -0
- package/packages/happy2-server/dist/modules/auth/service.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/auth/service.js +26 -0
- package/packages/happy2-server/dist/modules/auth/service.js.map +1 -1
- package/packages/happy2-server/dist/modules/auth/tokens.d.ts +21 -0
- package/packages/happy2-server/dist/modules/auth/tokens.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/auth/tokens.js +97 -3
- package/packages/happy2-server/dist/modules/auth/tokens.js.map +1 -1
- package/packages/happy2-server/dist/modules/auth/tokens.test.js +77 -0
- package/packages/happy2-server/dist/modules/auth/tokens.test.js.map +1 -1
- package/packages/happy2-server/dist/modules/chat/asAgentTurnTrace.d.ts +17 -0
- package/packages/happy2-server/dist/modules/chat/asAgentTurnTrace.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/chat/asAgentTurnTrace.js +98 -0
- package/packages/happy2-server/dist/modules/chat/asAgentTurnTrace.js.map +1 -0
- package/packages/happy2-server/dist/modules/chat/asServiceMessage.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/chat/asServiceMessage.js +13 -5
- package/packages/happy2-server/dist/modules/chat/asServiceMessage.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/chat/chatUpdateMetadata.d.ts +20 -0
- package/packages/happy2-server/dist/modules/chat/chatUpdateMetadata.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/chat/chatUpdateMetadata.js +38 -0
- package/packages/happy2-server/dist/modules/chat/chatUpdateMetadata.js.map +1 -0
- package/packages/happy2-server/dist/modules/chat/types.d.ts +6 -0
- package/packages/happy2-server/dist/modules/chat/types.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/chat/types.js.map +1 -1
- package/packages/happy2-server/dist/modules/chat/userRequireActiveHuman.d.ts +7 -0
- package/packages/happy2-server/dist/modules/chat/userRequireActiveHuman.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/chat/userRequireActiveHuman.js +19 -0
- package/packages/happy2-server/dist/modules/chat/userRequireActiveHuman.js.map +1 -0
- package/packages/happy2-server/dist/modules/chat/userRequireServerAdmin.d.ts +2 -2
- package/packages/happy2-server/dist/modules/chat/userRequireServerAdmin.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/chat/userRequireServerAdmin.js +8 -5
- package/packages/happy2-server/dist/modules/chat/userRequireServerAdmin.js.map +1 -1
- package/packages/happy2-server/dist/modules/config/defaults.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/config/defaults.js +1 -0
- package/packages/happy2-server/dist/modules/config/defaults.js.map +1 -1
- package/packages/happy2-server/dist/modules/config/defaults.test.js +1 -0
- package/packages/happy2-server/dist/modules/config/defaults.test.js.map +1 -1
- package/packages/happy2-server/dist/modules/config/loader.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/config/loader.js +4 -0
- package/packages/happy2-server/dist/modules/config/loader.js.map +1 -1
- package/packages/happy2-server/dist/modules/config/loader.test.js +12 -0
- package/packages/happy2-server/dist/modules/config/loader.test.js.map +1 -1
- package/packages/happy2-server/dist/modules/config/type.d.ts +3 -0
- package/packages/happy2-server/dist/modules/config/type.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/message/messageGetProjection.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/message/messageGetProjection.js +28 -0
- package/packages/happy2-server/dist/modules/message/messageGetProjection.js.map +1 -1
- package/packages/happy2-server/dist/modules/permission/impl/permissionEffectiveDb.d.ts +4 -0
- package/packages/happy2-server/dist/modules/permission/impl/permissionEffectiveDb.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/permission/impl/permissionEffectiveDb.js +39 -0
- package/packages/happy2-server/dist/modules/permission/impl/permissionEffectiveDb.js.map +1 -0
- package/packages/happy2-server/dist/modules/permission/impl/permissionMutationRecord.d.ts +10 -0
- package/packages/happy2-server/dist/modules/permission/impl/permissionMutationRecord.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/permission/impl/permissionMutationRecord.js +31 -0
- package/packages/happy2-server/dist/modules/permission/impl/permissionMutationRecord.js.map +1 -0
- package/packages/happy2-server/dist/modules/permission/permissionGetEffective.d.ts +8 -0
- package/packages/happy2-server/dist/modules/permission/permissionGetEffective.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/permission/permissionGetEffective.js +13 -0
- package/packages/happy2-server/dist/modules/permission/permissionGetEffective.js.map +1 -0
- package/packages/happy2-server/dist/modules/permission/roleCreate.d.ts +16 -0
- package/packages/happy2-server/dist/modules/permission/roleCreate.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/permission/roleCreate.js +70 -0
- package/packages/happy2-server/dist/modules/permission/roleCreate.js.map +1 -0
- package/packages/happy2-server/dist/modules/permission/roleDelete.d.ts +11 -0
- package/packages/happy2-server/dist/modules/permission/roleDelete.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/permission/roleDelete.js +41 -0
- package/packages/happy2-server/dist/modules/permission/roleDelete.js.map +1 -0
- package/packages/happy2-server/dist/modules/permission/roleList.d.ts +8 -0
- package/packages/happy2-server/dist/modules/permission/roleList.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/permission/roleList.js +36 -0
- package/packages/happy2-server/dist/modules/permission/roleList.js.map +1 -0
- package/packages/happy2-server/dist/modules/permission/roleUpdate.d.ts +14 -0
- package/packages/happy2-server/dist/modules/permission/roleUpdate.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/permission/roleUpdate.js +78 -0
- package/packages/happy2-server/dist/modules/permission/roleUpdate.js.map +1 -0
- package/packages/happy2-server/dist/modules/permission/types.d.ts +24 -0
- package/packages/happy2-server/dist/modules/permission/types.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/permission/types.js +10 -0
- package/packages/happy2-server/dist/modules/permission/types.js.map +1 -0
- package/packages/happy2-server/dist/modules/permission/userPermissionGet.d.ts +16 -0
- package/packages/happy2-server/dist/modules/permission/userPermissionGet.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/permission/userPermissionGet.js +33 -0
- package/packages/happy2-server/dist/modules/permission/userPermissionGet.js.map +1 -0
- package/packages/happy2-server/dist/modules/permission/userPermissionUpdate.d.ts +12 -0
- package/packages/happy2-server/dist/modules/permission/userPermissionUpdate.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/permission/userPermissionUpdate.js +44 -0
- package/packages/happy2-server/dist/modules/permission/userPermissionUpdate.js.map +1 -0
- package/packages/happy2-server/dist/modules/permission/userRequireAnyPermission.d.ts +8 -0
- package/packages/happy2-server/dist/modules/permission/userRequireAnyPermission.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/permission/userRequireAnyPermission.js +12 -0
- package/packages/happy2-server/dist/modules/permission/userRequireAnyPermission.js.map +1 -0
- package/packages/happy2-server/dist/modules/permission/userRequirePermission.d.ts +8 -0
- package/packages/happy2-server/dist/modules/permission/userRequirePermission.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/permission/userRequirePermission.js +12 -0
- package/packages/happy2-server/dist/modules/permission/userRequirePermission.js.map +1 -0
- package/packages/happy2-server/dist/modules/permission/userRoleAssign.d.ts +12 -0
- package/packages/happy2-server/dist/modules/permission/userRoleAssign.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/permission/userRoleAssign.js +46 -0
- package/packages/happy2-server/dist/modules/permission/userRoleAssign.js.map +1 -0
- package/packages/happy2-server/dist/modules/permission/userRoleUnassign.d.ts +12 -0
- package/packages/happy2-server/dist/modules/permission/userRoleUnassign.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/permission/userRoleUnassign.js +53 -0
- package/packages/happy2-server/dist/modules/permission/userRoleUnassign.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/archive.d.ts +7 -0
- package/packages/happy2-server/dist/modules/plugin/archive.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/archive.js +222 -0
- package/packages/happy2-server/dist/modules/plugin/archive.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/catalog.d.ts +5 -1
- package/packages/happy2-server/dist/modules/plugin/catalog.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/catalog.js +35 -16
- package/packages/happy2-server/dist/modules/plugin/catalog.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/catalog.test.js +6 -2
- package/packages/happy2-server/dist/modules/plugin/catalog.test.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/httpBridge.d.ts +1 -0
- package/packages/happy2-server/dist/modules/plugin/httpBridge.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/httpBridge.js +7 -0
- package/packages/happy2-server/dist/modules/plugin/httpBridge.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 +12 -2
- 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 +12 -3
- 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/impl/pluginSkillSource.d.ts +11 -0
- package/packages/happy2-server/dist/modules/plugin/impl/pluginSkillSource.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/pluginSkillSource.js +2 -0
- package/packages/happy2-server/dist/modules/plugin/impl/pluginSkillSource.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 +27 -1
- package/packages/happy2-server/dist/modules/plugin/packageStore.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/packageStore.js +234 -15
- 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/pluginAuthorizeManagement.d.ts +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginAuthorizeManagement.js +3 -3
- package/packages/happy2-server/dist/modules/plugin/pluginAuthorizeManagement.js.map +1 -1
- 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/pluginFindBySource.d.ts +3 -1
- package/packages/happy2-server/dist/modules/plugin/pluginFindBySource.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginFindBySource.js +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginFindBySource.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginGetImage.d.ts +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginGetImage.js +3 -3
- package/packages/happy2-server/dist/modules/plugin/pluginGetImage.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginGetSource.d.ts +13 -0
- package/packages/happy2-server/dist/modules/plugin/pluginGetSource.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginGetSource.js +37 -0
- package/packages/happy2-server/dist/modules/plugin/pluginGetSource.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 +36 -5
- 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/pluginInstallationList.d.ts +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationList.js +3 -3
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationList.js.map +1 -1
- 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/pluginList.d.ts +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginList.js +3 -3
- package/packages/happy2-server/dist/modules/plugin/pluginList.js.map +1 -1
- 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/pluginSkillsListInstalled.d.ts +8 -0
- package/packages/happy2-server/dist/modules/plugin/pluginSkillsListInstalled.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginSkillsListInstalled.js +24 -0
- package/packages/happy2-server/dist/modules/plugin/pluginSkillsListInstalled.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginSkillsListReady.d.ts +8 -0
- package/packages/happy2-server/dist/modules/plugin/pluginSkillsListReady.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginSkillsListReady.js +25 -0
- package/packages/happy2-server/dist/modules/plugin/pluginSkillsListReady.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginUninstall.d.ts +13 -0
- package/packages/happy2-server/dist/modules/plugin/pluginUninstall.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginUninstall.js +63 -0
- package/packages/happy2-server/dist/modules/plugin/pluginUninstall.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/runtime.d.ts +1 -0
- package/packages/happy2-server/dist/modules/plugin/runtime.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/runtime.js +1 -0
- package/packages/happy2-server/dist/modules/plugin/runtime.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/service.d.ts +157 -5
- package/packages/happy2-server/dist/modules/plugin/service.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/service.js +789 -19
- package/packages/happy2-server/dist/modules/plugin/service.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/source.d.ts +35 -0
- package/packages/happy2-server/dist/modules/plugin/source.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/source.js +189 -0
- package/packages/happy2-server/dist/modules/plugin/source.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/types.d.ts +116 -11
- 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/realtime/events.d.ts +3 -0
- package/packages/happy2-server/dist/modules/realtime/events.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/realtime/events.js +37 -5
- package/packages/happy2-server/dist/modules/realtime/events.js.map +1 -1
- package/packages/happy2-server/dist/modules/realtime/local.test.js +2 -0
- package/packages/happy2-server/dist/modules/realtime/local.test.js.map +1 -1
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.js +4 -2
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.js.map +1 -1
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.test.js +4 -1
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.test.js.map +1 -1
- package/packages/happy2-server/dist/modules/sandbox/types.d.ts +1 -0
- package/packages/happy2-server/dist/modules/sandbox/types.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/schema.d.ts +8024 -5446
- package/packages/happy2-server/dist/modules/schema.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/schema.js +140 -0
- package/packages/happy2-server/dist/modules/schema.js.map +1 -1
- package/packages/happy2-server/dist/modules/sync/syncGetDifference.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/sync/syncGetDifference.js +2 -0
- package/packages/happy2-server/dist/modules/sync/syncGetDifference.js.map +1 -1
- package/packages/happy2-server/dist/modules/user/userAdministrationList.js +2 -2
- package/packages/happy2-server/dist/modules/user/userAdministrationList.js.map +1 -1
- package/packages/happy2-server/dist/modules/user/userAdministrationUpdate.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/user/userAdministrationUpdate.js +49 -6
- package/packages/happy2-server/dist/modules/user/userAdministrationUpdate.js.map +1 -1
- package/packages/happy2-server/dist/modules/user/userCreateProfile.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/user/userCreateProfile.js +17 -2
- package/packages/happy2-server/dist/modules/user/userCreateProfile.js.map +1 -1
- package/packages/happy2-server/dist/routes/agents.d.ts.map +1 -1
- package/packages/happy2-server/dist/routes/agents.js +4 -2
- package/packages/happy2-server/dist/routes/agents.js.map +1 -1
- package/packages/happy2-server/dist/routes/auth.d.ts.map +1 -1
- package/packages/happy2-server/dist/routes/auth.js +12 -0
- package/packages/happy2-server/dist/routes/auth.js.map +1 -1
- package/packages/happy2-server/dist/routes/collaboration.d.ts.map +1 -1
- package/packages/happy2-server/dist/routes/collaboration.js +7 -0
- package/packages/happy2-server/dist/routes/collaboration.js.map +1 -1
- package/packages/happy2-server/dist/routes/files.d.ts.map +1 -1
- package/packages/happy2-server/dist/routes/files.js +2 -0
- package/packages/happy2-server/dist/routes/files.js.map +1 -1
- package/packages/happy2-server/dist/routes/permissions.d.ts +6 -0
- package/packages/happy2-server/dist/routes/permissions.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/permissions.js +207 -0
- package/packages/happy2-server/dist/routes/permissions.js.map +1 -0
- 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 +356 -5
- 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 +375 -7
- package/packages/happy2-server/dist/routes/plugins.js.map +1 -1
- package/packages/happy2-server/dist/server.d.ts +4 -0
- package/packages/happy2-server/dist/server.d.ts.map +1 -1
- package/packages/happy2-server/dist/server.js +12 -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-Dys3sWv8.css +2 -0
- package/packages/happy2-server/dist/web/index.html +2 -2
- package/packages/happy2-server/drizzle/0023_roles_and_permissions.sql +82 -0
- package/packages/happy2-server/drizzle/0024_session_bound_dev_tokens.sql +11 -0
- package/packages/happy2-server/drizzle/0025_plugin_skills.sql +8 -0
- package/packages/happy2-server/drizzle/0026_agent_turn_traces.sql +35 -0
- package/packages/happy2-server/drizzle/0027_chat_agent_effort.sql +9 -0
- 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 +49 -0
- package/packages/happy2-server/happy2.example.toml +6 -0
- package/packages/happy2-server/plugins/README.md +7 -1
- package/packages/happy2-server/plugins/chat-management/container/Dockerfile +6 -0
- package/packages/happy2-server/plugins/chat-management/plugin.json +17 -0
- package/packages/happy2-server/plugins/chat-management/plugin.png +0 -0
- package/packages/happy2-server/plugins/chat-management/server.mjs +280 -0
- 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/web/assets/index-9SGCQLg7.js +0 -46
- package/packages/happy2-server/dist/web/assets/index-DWXBQDJB.css +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type AgentImageSummary } from "../chat/types.js";
|
|
2
2
|
import { type DrizzleExecutor } from "../drizzle.js";
|
|
3
3
|
/**
|
|
4
|
-
* Lists agent images
|
|
5
|
-
* Reading
|
|
4
|
+
* Lists agent images and the configured default to a caller allowed to manage images, assign them to chats, or select a runtime for plugin installation.
|
|
5
|
+
* Reading summaries as one response gives each authorized selection surface exact context without granting image mutation authority.
|
|
6
6
|
*/
|
|
7
7
|
export declare function agentImageList(executor: DrizzleExecutor, actorUserId: string): Promise<{
|
|
8
8
|
defaultImageId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentImageList.d.ts","sourceRoot":"","sources":["../../../sources/modules/agent/agentImageList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAOrD;;;GAGG;AACH,wBAAsB,cAAc,CAChC,QAAQ,EAAE,eAAe,EACzB,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC;IACP,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC/B,CAAC,
|
|
1
|
+
{"version":3,"file":"agentImageList.d.ts","sourceRoot":"","sources":["../../../sources/modules/agent/agentImageList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAOrD;;;GAGG;AACH,wBAAsB,cAAc,CAChC,QAAQ,EAAE,eAAe,EACzB,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC;IACP,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC/B,CAAC,CA2BD"}
|
|
@@ -4,13 +4,17 @@ import { agentImageSelection } from "./impl/agentImageSelection.js";
|
|
|
4
4
|
import { agentImages, agentImageSettings } from "../schema.js";
|
|
5
5
|
import { asAgentImage } from "./impl/asAgentImage.js";
|
|
6
6
|
import { eq } from "drizzle-orm";
|
|
7
|
-
import {
|
|
7
|
+
import { userRequireAnyPermission } from "../permission/userRequireAnyPermission.js";
|
|
8
8
|
/**
|
|
9
|
-
* Lists agent images
|
|
10
|
-
* Reading
|
|
9
|
+
* Lists agent images and the configured default to a caller allowed to manage images, assign them to chats, or select a runtime for plugin installation.
|
|
10
|
+
* Reading summaries as one response gives each authorized selection surface exact context without granting image mutation authority.
|
|
11
11
|
*/
|
|
12
12
|
export async function agentImageList(executor, actorUserId) {
|
|
13
|
-
await
|
|
13
|
+
await userRequireAnyPermission(executor, actorUserId, [
|
|
14
|
+
"manageImages",
|
|
15
|
+
"assignImagesToChats",
|
|
16
|
+
"managePlugins",
|
|
17
|
+
]);
|
|
14
18
|
const [settings, images] = await Promise.all([
|
|
15
19
|
executor
|
|
16
20
|
.select({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentImageList.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentImageList.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAwB,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE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1C;YACH,CAAC,CAAC,EAAE,CAAC;QACT,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;KACnC,CAAC;AACN,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AgentImageSummary, type MutationHint } from "../chat/types.js";
|
|
2
2
|
import { type DrizzleExecutor } from "../drizzle.js";
|
|
3
3
|
/**
|
|
4
|
-
* Queues
|
|
4
|
+
* Queues a manageImages-authorized agentImages definition for a fresh build and resets its prior terminal output.
|
|
5
5
|
* Recording the lifecycle transition with its audit and sync evidence gives workers and clients one authoritative build request.
|
|
6
6
|
*/
|
|
7
7
|
export declare function agentImageRequestBuild(executor: DrizzleExecutor, input: {
|
|
@@ -8,14 +8,14 @@ import { asAgentImage } from "./impl/asAgentImage.js";
|
|
|
8
8
|
import { chatAppendAudit } from "../chat/chatAppendAudit.js";
|
|
9
9
|
import { syncEventInsert } from "../sync/syncEventInsert.js";
|
|
10
10
|
import { syncSequenceNext } from "../sync/syncSequenceNext.js";
|
|
11
|
-
import {
|
|
11
|
+
import { userRequirePermission } from "../permission/userRequirePermission.js";
|
|
12
12
|
/**
|
|
13
|
-
* Queues
|
|
13
|
+
* Queues a manageImages-authorized agentImages definition for a fresh build and resets its prior terminal output.
|
|
14
14
|
* Recording the lifecycle transition with its audit and sync evidence gives workers and clients one authoritative build request.
|
|
15
15
|
*/
|
|
16
16
|
export async function agentImageRequestBuild(executor, input) {
|
|
17
17
|
return withTransaction(executor, async (tx) => {
|
|
18
|
-
await
|
|
18
|
+
await userRequirePermission(tx, input.actorUserId, "manageImages");
|
|
19
19
|
const [current] = await tx
|
|
20
20
|
.select({
|
|
21
21
|
status: agentImages.status,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentImageRequestBuild.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentImageRequestBuild.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,kBAAkB,EAAqB,MAAM,kBAAkB,CAAC;A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KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;aACxC,SAAS,CAAC,mBAAmB,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACnE,MAAM,eAAe,CAAC,EAAE,EAAE;YACtB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,MAAM,EAAE,6BAA6B;YACrC,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,KAAK,CAAC,OAAO;SAC1B,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,EAAE,CAAC,CAAC;QAC5C,MAAM,eAAe,CAAC,EAAE,EAAE;YACtB,QAAQ;YACR,IAAI,EAAE,2BAA2B;YACjC,QAAQ,EAAE,KAAK,CAAC,OAAO;YACvB,WAAW,EAAE,KAAK,CAAC,WAAW;SACjC,CAAC,CAAC;QACH,OAAO;YACH,IAAI,EAAE,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;YACxC,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC;SAC7B,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AgentImageSummary, type MutationHint } from "../chat/types.js";
|
|
2
2
|
import { type DrizzleExecutor } from "../drizzle.js";
|
|
3
3
|
/**
|
|
4
|
-
* Selects a ready image in agentImageSettings as the server default after
|
|
4
|
+
* Selects a ready image in agentImageSettings as the server default after manageImages authorization.
|
|
5
5
|
* Coupling the setting with sync and audit records prevents clients from seeing an unexplained default-image change.
|
|
6
6
|
*/
|
|
7
7
|
export declare function agentImageSetDefault(executor: DrizzleExecutor, input: {
|
|
@@ -8,14 +8,14 @@ import { asAgentImage } from "./impl/asAgentImage.js";
|
|
|
8
8
|
import { chatAppendAudit } from "../chat/chatAppendAudit.js";
|
|
9
9
|
import { syncEventInsert } from "../sync/syncEventInsert.js";
|
|
10
10
|
import { syncSequenceNext } from "../sync/syncSequenceNext.js";
|
|
11
|
-
import {
|
|
11
|
+
import { userRequirePermission } from "../permission/userRequirePermission.js";
|
|
12
12
|
/**
|
|
13
|
-
* Selects a ready image in agentImageSettings as the server default after
|
|
13
|
+
* Selects a ready image in agentImageSettings as the server default after manageImages authorization.
|
|
14
14
|
* Coupling the setting with sync and audit records prevents clients from seeing an unexplained default-image change.
|
|
15
15
|
*/
|
|
16
16
|
export async function agentImageSetDefault(executor, input) {
|
|
17
17
|
return withTransaction(executor, async (tx) => {
|
|
18
|
-
await
|
|
18
|
+
await userRequirePermission(tx, input.actorUserId, "manageImages");
|
|
19
19
|
const [image] = await tx
|
|
20
20
|
.select(agentImageSelection)
|
|
21
21
|
.from(agentImages)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentImageSetDefault.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentImageSetDefault.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,kBAAkB,EAAqB,MAAM,kBAAkB,CAAC;AAEjG,OAAO,EAAwB,eAAe,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"agentImageSetDefault.js","sourceRoot":"","sources":["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,IAAI,CAAC,KAAK,CAAC,eAAe;YAClD,MAAM,IAAI,kBAAkB,CAAC,UAAU,EAAE,6CAA6C,CAAC,CAAC;QAC5F,MAAM,EAAE;aACH,MAAM,CAAC,kBAAkB,CAAC;aAC1B,GAAG,CAAC;YACD,cAAc,EAAE,KAAK,CAAC,OAAO;YAC7B,eAAe,EAAE,KAAK,CAAC,WAAW;YAClC,SAAS,EAAE,GAAG,CAAA,mBAAmB;SACpC,CAAC;aACD,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QACzC,MAAM,eAAe,CAAC,EAAE,EAAE;YACtB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,MAAM,EAAE,8BAA8B;YACtC,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,KAAK,CAAC,OAAO;SAC1B,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,EAAE,CAAC,CAAC;QAC5C,MAAM,eAAe,CAAC,EAAE,EAAE;YACtB,QAAQ;YACR,IAAI,EAAE,4BAA4B;YAClC,QAAQ,EAAE,KAAK,CAAC,OAAO;YACvB,WAAW,EAAE,KAAK,CAAC,WAAW;SACjC,CAAC,CAAC;QACH,OAAO;YACH,IAAI,EAAE,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;YACxC,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC;SAC7B,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type DrizzleExecutor } from "../drizzle.js";
|
|
2
2
|
import { type MutationHint } from "../chat/types.js";
|
|
3
3
|
/**
|
|
4
|
-
* Removes
|
|
4
|
+
* Removes all agentSecretAgentAssignments and agentSecretChannelAssignments for one secret after requiring manageSecrets permission.
|
|
5
5
|
* Deleting the assignment alongside sync and audit evidence makes secret access disappear as one reviewable authorization change.
|
|
6
6
|
*/
|
|
7
7
|
export declare function agentSecretAssignmentDelete(executor: DrizzleExecutor, input: {
|
|
@@ -6,14 +6,14 @@ import { eq } from "drizzle-orm";
|
|
|
6
6
|
import { chatAppendAudit } from "../chat/chatAppendAudit.js";
|
|
7
7
|
import { syncEventInsert } from "../sync/syncEventInsert.js";
|
|
8
8
|
import { syncSequenceNext } from "../sync/syncSequenceNext.js";
|
|
9
|
-
import {
|
|
9
|
+
import { userRequirePermission } from "../permission/userRequirePermission.js";
|
|
10
10
|
/**
|
|
11
|
-
* Removes
|
|
11
|
+
* Removes all agentSecretAgentAssignments and agentSecretChannelAssignments for one secret after requiring manageSecrets permission.
|
|
12
12
|
* Deleting the assignment alongside sync and audit evidence makes secret access disappear as one reviewable authorization change.
|
|
13
13
|
*/
|
|
14
14
|
export async function agentSecretAssignmentDelete(executor, input) {
|
|
15
15
|
return withTransaction(executor, async (tx) => {
|
|
16
|
-
await
|
|
16
|
+
await userRequirePermission(tx, input.actorUserId, "manageSecrets");
|
|
17
17
|
await tx
|
|
18
18
|
.delete(agentSecretAgentAssignments)
|
|
19
19
|
.where(eq(agentSecretAgentAssignments.secretId, input.secretId));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentSecretAssignmentDelete.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentSecretAssignmentDelete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,eAAe,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAqB,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAE1F,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA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Q;YACR,IAAI,EAAE,qBAAqB;YAC3B,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,WAAW,EAAE,KAAK,CAAC,WAAW;SACjC,CAAC,CAAC;QACH,MAAM,eAAe,CAAC,EAAE,EAAE;YACtB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,MAAM,EAAE,sBAAsB;YAC9B,UAAU,EAAE,cAAc;YAC1B,QAAQ,EAAE,KAAK,CAAC,QAAQ;SAC3B,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AgentSecretAssignment } from "./impl/agentSecretAssignment.js";
|
|
2
2
|
import { type DrizzleExecutor } from "../drizzle.js";
|
|
3
3
|
/**
|
|
4
|
-
* Groups
|
|
4
|
+
* Groups secret assignments for a caller allowed to manage secrets or assign them to agents and channels.
|
|
5
5
|
* Sorting both source rows and the merged result gives management clients stable agent and channel membership lists for each secret.
|
|
6
6
|
*/
|
|
7
7
|
export declare function agentSecretAssignmentList(executor: DrizzleExecutor, actorUserId: string): Promise<AgentSecretAssignment[]>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {} from "./impl/agentSecretAssignment.js";
|
|
2
2
|
import {} from "../drizzle.js";
|
|
3
3
|
import { agentSecretAgentAssignments, agentSecretChannelAssignments } from "../schema.js";
|
|
4
|
-
import {
|
|
4
|
+
import { userRequireAnyPermission } from "../permission/userRequireAnyPermission.js";
|
|
5
5
|
/**
|
|
6
|
-
* Groups
|
|
6
|
+
* Groups secret assignments for a caller allowed to manage secrets or assign them to agents and channels.
|
|
7
7
|
* Sorting both source rows and the merged result gives management clients stable agent and channel membership lists for each secret.
|
|
8
8
|
*/
|
|
9
9
|
export async function agentSecretAssignmentList(executor, actorUserId) {
|
|
10
|
-
await
|
|
10
|
+
await userRequireAnyPermission(executor, actorUserId, ["manageSecrets", "assignSecrets"]);
|
|
11
11
|
const [agentRows, channelRows] = await Promise.all([
|
|
12
12
|
executor
|
|
13
13
|
.select({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentSecretAssignmentList.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentSecretAssignmentList.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAwB,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAE1F,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"agentSecretAssignmentList.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentSecretAssignmentList.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAwB,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAE1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC3C,QAAyB,EACzB,WAAmB;IAEnB,MAAM,wBAAwB,CAAC,QAAQ,EAAE,WAAW,EAAE,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC;IAC1F,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC/C,QAAQ;aACH,MAAM,CAAC;YACJ,QAAQ,EAAE,2BAA2B,CAAC,QAAQ;YAC9C,WAAW,EAAE,2BAA2B,CAAC,WAAW;SACvD,CAAC;aACD,IAAI,CAAC,2BAA2B,CAAC;aACjC,OAAO,CAAC,2BAA2B,CAAC,QAAQ,EAAE,2BAA2B,CAAC,WAAW,CAAC;QAC3F,QAAQ;aACH,MAAM,CAAC;YACJ,QAAQ,EAAE,6BAA6B,CAAC,QAAQ;YAChD,SAAS,EAAE,6BAA6B,CAAC,MAAM;SAClD,CAAC;aACD,IAAI,CAAC,6BAA6B,CAAC;aACnC,OAAO,CAAC,6BAA6B,CAAC,QAAQ,EAAE,6BAA6B,CAAC,MAAM,CAAC;KAC7F,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,IAAI,GAAG,EAAiC,CAAC;IAC7D,MAAM,GAAG,GAAG,CAAC,QAAgB,EAAE,EAAE;QAC7B,IAAI,UAAU,GAAG,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,UAAU,EAAE,CAAC;YACd,UAAU,GAAG;gBACT,QAAQ;gBACR,YAAY,EAAE,EAAE;gBAChB,UAAU,EAAE,EAAE;aACjB,CAAC;YACF,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,UAAU,CAAC;IACtB,CAAC,CAAC;IACF,KAAK,MAAM,GAAG,IAAI,SAAS;QAAE,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAClF,KAAK,MAAM,GAAG,IAAI,WAAW;QAAE,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAChF,OAAO,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAClD,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAC9C,CAAC;AACN,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type MutationHint } from "../chat/types.js";
|
|
2
2
|
import { type DrizzleExecutor } from "../drizzle.js";
|
|
3
3
|
/**
|
|
4
|
-
* Grants an agent access
|
|
4
|
+
* Grants an agent access by inserting agentSecretAgentAssignments after requiring assignSecrets permission.
|
|
5
5
|
* Keeping the grant, audit entry, and sync event together prevents silent expansion of an agent's runtime credentials.
|
|
6
6
|
*/
|
|
7
7
|
export declare function agentSecretAttachToAgent(executor: DrizzleExecutor, input: {
|
|
@@ -6,14 +6,14 @@ import { areaHint } from "../chat/areaHint.js";
|
|
|
6
6
|
import { chatAppendAudit } from "../chat/chatAppendAudit.js";
|
|
7
7
|
import { syncEventInsert } from "../sync/syncEventInsert.js";
|
|
8
8
|
import { syncSequenceNext } from "../sync/syncSequenceNext.js";
|
|
9
|
-
import {
|
|
9
|
+
import { userRequirePermission } from "../permission/userRequirePermission.js";
|
|
10
10
|
/**
|
|
11
|
-
* Grants an agent access
|
|
11
|
+
* Grants an agent access by inserting agentSecretAgentAssignments after requiring assignSecrets permission.
|
|
12
12
|
* Keeping the grant, audit entry, and sync event together prevents silent expansion of an agent's runtime credentials.
|
|
13
13
|
*/
|
|
14
14
|
export async function agentSecretAttachToAgent(executor, input) {
|
|
15
15
|
return withTransaction(executor, async (tx) => {
|
|
16
|
-
await
|
|
16
|
+
await userRequirePermission(tx, input.actorUserId, "assignSecrets");
|
|
17
17
|
const [agent] = await tx
|
|
18
18
|
.select({
|
|
19
19
|
id: users.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentSecretAttachToAgent.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentSecretAttachToAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAqB,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAwB,eAAe,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,EAAE,2BAA2B,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MA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leExecutor } from "../drizzle.js";
|
|
3
3
|
/**
|
|
4
|
-
* Grants a secret
|
|
4
|
+
* Grants a secret to an eligible channel through agentSecretChannelAssignments after requiring assignSecrets permission.
|
|
5
5
|
* The assignment, audit entry, and sync event commit together so the resulting credential exposure is never silent or partially reported.
|
|
6
6
|
*/
|
|
7
7
|
export declare function agentSecretAttachToChannel(executor: DrizzleExecutor, input: {
|
|
@@ -6,14 +6,14 @@ import { areaHint } from "../chat/areaHint.js";
|
|
|
6
6
|
import { chatAppendAudit } from "../chat/chatAppendAudit.js";
|
|
7
7
|
import { syncEventInsert } from "../sync/syncEventInsert.js";
|
|
8
8
|
import { syncSequenceNext } from "../sync/syncSequenceNext.js";
|
|
9
|
-
import {
|
|
9
|
+
import { userRequirePermission } from "../permission/userRequirePermission.js";
|
|
10
10
|
/**
|
|
11
|
-
* Grants a secret
|
|
11
|
+
* Grants a secret to an eligible channel through agentSecretChannelAssignments after requiring assignSecrets permission.
|
|
12
12
|
* The assignment, audit entry, and sync event commit together so the resulting credential exposure is never silent or partially reported.
|
|
13
13
|
*/
|
|
14
14
|
export async function agentSecretAttachToChannel(executor, input) {
|
|
15
15
|
return withTransaction(executor, async (tx) => {
|
|
16
|
-
await
|
|
16
|
+
await userRequirePermission(tx, input.actorUserId, "assignSecrets");
|
|
17
17
|
const [channel] = await tx
|
|
18
18
|
.select({
|
|
19
19
|
id: chats.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentSecretAttachToChannel.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentSecretAttachToChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAqB,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAwB,eAAe,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,EAAE,6BAA6B,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAA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H,OAAO,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type DrizzleExecutor } from "../drizzle.js";
|
|
2
|
+
import type { Permission } from "../permission/types.js";
|
|
2
3
|
/**
|
|
3
|
-
* Requires the actor
|
|
4
|
-
* A shared authorization entry point keeps secret
|
|
4
|
+
* Requires the actor's requested secret-management capability before any external Rig secret operation proceeds.
|
|
5
|
+
* A shared authorization entry point keeps non-database secret lifecycle work aligned with the same grants enforced by durable actions.
|
|
5
6
|
*/
|
|
6
|
-
export declare function agentSecretAuthorizeManagement(executor: DrizzleExecutor, actorUserId: string): Promise<void>;
|
|
7
|
+
export declare function agentSecretAuthorizeManagement(executor: DrizzleExecutor, actorUserId: string, permission: Extract<Permission, "manageSecrets" | "assignSecrets">): Promise<void>;
|
|
7
8
|
//# sourceMappingURL=agentSecretAuthorizeManagement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentSecretAuthorizeManagement.d.ts","sourceRoot":"","sources":["../../../sources/modules/agent/agentSecretAuthorizeManagement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;;GAGG;AACH,wBAAsB,8BAA8B,CAChD,QAAQ,EAAE,eAAe,EACzB,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"agentSecretAuthorizeManagement.d.ts","sourceRoot":"","sources":["../../../sources/modules/agent/agentSecretAuthorizeManagement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD;;;GAGG;AACH,wBAAsB,8BAA8B,CAChD,QAAQ,EAAE,eAAe,EACzB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,eAAe,GAAG,eAAe,CAAC,GACnE,OAAO,CAAC,IAAI,CAAC,CAEf"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {} from "../drizzle.js";
|
|
2
|
-
import {
|
|
2
|
+
import { userRequirePermission } from "../permission/userRequirePermission.js";
|
|
3
3
|
/**
|
|
4
|
-
* Requires the actor
|
|
5
|
-
* A shared authorization entry point keeps secret
|
|
4
|
+
* Requires the actor's requested secret-management capability before any external Rig secret operation proceeds.
|
|
5
|
+
* A shared authorization entry point keeps non-database secret lifecycle work aligned with the same grants enforced by durable actions.
|
|
6
6
|
*/
|
|
7
|
-
export async function agentSecretAuthorizeManagement(executor, actorUserId) {
|
|
8
|
-
await
|
|
7
|
+
export async function agentSecretAuthorizeManagement(executor, actorUserId, permission) {
|
|
8
|
+
await userRequirePermission(executor, actorUserId, permission);
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=agentSecretAuthorizeManagement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentSecretAuthorizeManagement.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentSecretAuthorizeManagement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"agentSecretAuthorizeManagement.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentSecretAuthorizeManagement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAE/E;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAChD,QAAyB,EACzB,WAAmB,EACnB,UAAkE;IAElE,MAAM,qBAAqB,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type DrizzleExecutor } from "../drizzle.js";
|
|
2
2
|
import { type MutationHint } from "../chat/types.js";
|
|
3
3
|
/**
|
|
4
|
-
* Revokes a direct
|
|
4
|
+
* Revokes a direct grant by deleting agentSecretAgentAssignments after requiring assignSecrets permission.
|
|
5
5
|
* Publishing revocation and audit evidence in the same commit ensures future runs cannot retain a grant clients still believe exists.
|
|
6
6
|
*/
|
|
7
7
|
export declare function agentSecretDetachFromAgent(executor: DrizzleExecutor, input: {
|
|
@@ -6,14 +6,14 @@ import { areaHint } from "../chat/areaHint.js";
|
|
|
6
6
|
import { chatAppendAudit } from "../chat/chatAppendAudit.js";
|
|
7
7
|
import { syncEventInsert } from "../sync/syncEventInsert.js";
|
|
8
8
|
import { syncSequenceNext } from "../sync/syncSequenceNext.js";
|
|
9
|
-
import {
|
|
9
|
+
import { userRequirePermission } from "../permission/userRequirePermission.js";
|
|
10
10
|
/**
|
|
11
|
-
* Revokes a direct
|
|
11
|
+
* Revokes a direct grant by deleting agentSecretAgentAssignments after requiring assignSecrets permission.
|
|
12
12
|
* Publishing revocation and audit evidence in the same commit ensures future runs cannot retain a grant clients still believe exists.
|
|
13
13
|
*/
|
|
14
14
|
export async function agentSecretDetachFromAgent(executor, input) {
|
|
15
15
|
return withTransaction(executor, async (tx) => {
|
|
16
|
-
await
|
|
16
|
+
await userRequirePermission(tx, input.actorUserId, "assignSecrets");
|
|
17
17
|
const removed = await tx
|
|
18
18
|
.delete(agentSecretAgentAssignments)
|
|
19
19
|
.where(and(eq(agentSecretAgentAssignments.secretId, input.secretId), eq(agentSecretAgentAssignments.agentUserId, input.agentUserId)))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentSecretDetachFromAgent.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentSecretDetachFromAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,eAAe,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAqB,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,2BAA2B,EAAE,MAA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Q,EAAE,KAAK,CAAC,QAAQ,CAAC,EACxD,EAAE,CAAC,2BAA2B,CAAC,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,CACjE,CACJ;aACA,SAAS,CAAC;YACP,QAAQ,EAAE,2BAA2B,CAAC,QAAQ;SACjD,CAAC,CAAC;QACP,IAAI,CAAC,OAAO,CAAC,MAAM;YAAE,OAAO,SAAS,CAAC;QACtC,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,EAAE,CAAC,CAAC;QAC5C,MAAM,eAAe,CAAC,EAAE,EAAE;YACtB,QAAQ;YACR,IAAI,EAAE,+BAA+B;YACrC,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,WAAW,EAAE,KAAK,CAAC,WAAW;SACjC,CAAC,CAAC;QACH,MAAM,eAAe,CAAC,EAAE,EAAE;YACtB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,MAAM,EAAE,kCAAkC;YAC1C,UAAU,EAAE,MAAM;YAClB,QAAQ,EAAE,KAAK,CAAC,WAAW;YAC3B,KAAK,EAAE;gBACH,QAAQ,EAAE,KAAK,CAAC,QAAQ;aAC3B;SACJ,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type DrizzleExecutor } from "../drizzle.js";
|
|
2
2
|
import { type MutationHint } from "../chat/types.js";
|
|
3
3
|
/**
|
|
4
|
-
* Revokes a channel
|
|
5
|
-
* The shared audit and sync transition makes the loss of runtime access immediate and attributable
|
|
4
|
+
* Revokes a channel grant from agentSecretChannelAssignments after requiring assignSecrets permission.
|
|
5
|
+
* The shared audit and sync transition makes the loss of runtime access immediate and attributable.
|
|
6
6
|
*/
|
|
7
7
|
export declare function agentSecretDetachFromChannel(executor: DrizzleExecutor, input: {
|
|
8
8
|
actorUserId: string;
|
|
@@ -6,14 +6,14 @@ import { areaHint } from "../chat/areaHint.js";
|
|
|
6
6
|
import { chatAppendAudit } from "../chat/chatAppendAudit.js";
|
|
7
7
|
import { syncEventInsert } from "../sync/syncEventInsert.js";
|
|
8
8
|
import { syncSequenceNext } from "../sync/syncSequenceNext.js";
|
|
9
|
-
import {
|
|
9
|
+
import { userRequirePermission } from "../permission/userRequirePermission.js";
|
|
10
10
|
/**
|
|
11
|
-
* Revokes a channel
|
|
12
|
-
* The shared audit and sync transition makes the loss of runtime access immediate and attributable
|
|
11
|
+
* Revokes a channel grant from agentSecretChannelAssignments after requiring assignSecrets permission.
|
|
12
|
+
* The shared audit and sync transition makes the loss of runtime access immediate and attributable.
|
|
13
13
|
*/
|
|
14
14
|
export async function agentSecretDetachFromChannel(executor, input) {
|
|
15
15
|
return withTransaction(executor, async (tx) => {
|
|
16
|
-
await
|
|
16
|
+
await userRequirePermission(tx, input.actorUserId, "assignSecrets");
|
|
17
17
|
const removed = await tx
|
|
18
18
|
.delete(agentSecretChannelAssignments)
|
|
19
19
|
.where(and(eq(agentSecretChannelAssignments.secretId, input.secretId), eq(agentSecretChannelAssignments.chatId, input.channelId)))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentSecretDetachFromChannel.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentSecretDetachFromChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,eAAe,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAqB,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6B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AG,MAAM,gBAAgB,CAAC,EAAE,CAAC,CAAC;QAC5C,MAAM,eAAe,CAAC,EAAE,EAAE;YACtB,QAAQ;YACR,IAAI,EAAE,iCAAiC;YACvC,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,WAAW,EAAE,KAAK,CAAC,WAAW;SACjC,CAAC,CAAC;QACH,MAAM,eAAe,CAAC,EAAE,EAAE;YACtB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,MAAM,EAAE,oCAAoC;YAC5C,UAAU,EAAE,MAAM;YAClB,QAAQ,EAAE,KAAK,CAAC,SAAS;YACzB,MAAM,EAAE,KAAK,CAAC,SAAS;YACvB,KAAK,EAAE;gBACH,QAAQ,EAAE,KAAK,CAAC,QAAQ;aAC3B;SACJ,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type DrizzleExecutor } from "../drizzle.js";
|
|
2
2
|
import { type MutationHint } from "../chat/types.js";
|
|
3
3
|
/**
|
|
4
|
-
* Records
|
|
4
|
+
* Records a manageSecrets-authorized agent-secret registration as a global sync event and audit entry.
|
|
5
5
|
* The transaction keeps both durable records on the same sequence so observers cannot see an unaudited registration signal.
|
|
6
6
|
*/
|
|
7
7
|
export declare function agentSecretRecordRegistration(executor: DrizzleExecutor, input: {
|
|
@@ -4,14 +4,14 @@ import { areaHint } from "../chat/areaHint.js";
|
|
|
4
4
|
import { chatAppendAudit } from "../chat/chatAppendAudit.js";
|
|
5
5
|
import { syncEventInsert } from "../sync/syncEventInsert.js";
|
|
6
6
|
import { syncSequenceNext } from "../sync/syncSequenceNext.js";
|
|
7
|
-
import {
|
|
7
|
+
import { userRequirePermission } from "../permission/userRequirePermission.js";
|
|
8
8
|
/**
|
|
9
|
-
* Records
|
|
9
|
+
* Records a manageSecrets-authorized agent-secret registration as a global sync event and audit entry.
|
|
10
10
|
* The transaction keeps both durable records on the same sequence so observers cannot see an unaudited registration signal.
|
|
11
11
|
*/
|
|
12
12
|
export async function agentSecretRecordRegistration(executor, input) {
|
|
13
13
|
return withTransaction(executor, async (tx) => {
|
|
14
|
-
await
|
|
14
|
+
await userRequirePermission(tx, input.actorUserId, "manageSecrets");
|
|
15
15
|
const sequence = await syncSequenceNext(tx);
|
|
16
16
|
await syncEventInsert(tx, {
|
|
17
17
|
sequence,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentSecretRecordRegistration.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentSecretRecordRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,eAAe,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAqB,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"agentSecretRecordRegistration.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentSecretRecordRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,eAAe,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAqB,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAE/E;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,6BAA6B,CAC/C,QAAyB,EACzB,KAGC;IAED,OAAO,eAAe,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE;QAC1C,MAAM,qBAAqB,CAAC,EAAE,EAAE,KAAK,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,EAAE,CAAC,CAAC;QAC5C,MAAM,eAAe,CAAC,EAAE,EAAE;YACtB,QAAQ;YACR,IAAI,EAAE,wBAAwB;YAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,WAAW,EAAE,KAAK,CAAC,WAAW;SACjC,CAAC,CAAC;QACH,MAAM,eAAe,CAAC,EAAE,EAAE;YACtB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,MAAM,EAAE,yBAAyB;YACjC,UAAU,EAAE,cAAc;YAC1B,QAAQ,EAAE,KAAK,CAAC,QAAQ;SAC3B,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DrizzleExecutor } from "../drizzle.js";
|
|
2
|
+
/** Derives one session's host-mounted isolated home from its durable Rig binding cwd and does not mutate durable state. This boundary centralizes the sandbox layout contract used by plugin skill reconciliation. */
|
|
3
|
+
export declare function agentSkillHomeGet(executor: DrizzleExecutor, sessionId: string): Promise<string>;
|
|
4
|
+
//# sourceMappingURL=agentSkillHomeGet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentSkillHomeGet.d.ts","sourceRoot":"","sources":["../../../sources/modules/agent/agentSkillHomeGet.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,sNAAsN;AACtN,wBAAsB,iBAAiB,CACnC,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAQjB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { eq } from "drizzle-orm";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { agentRigBindings } from "../schema.js";
|
|
4
|
+
/** Derives one session's host-mounted isolated home from its durable Rig binding cwd and does not mutate durable state. This boundary centralizes the sandbox layout contract used by plugin skill reconciliation. */
|
|
5
|
+
export async function agentSkillHomeGet(executor, sessionId) {
|
|
6
|
+
const [binding] = await executor
|
|
7
|
+
.select({ cwd: agentRigBindings.cwd })
|
|
8
|
+
.from(agentRigBindings)
|
|
9
|
+
.where(eq(agentRigBindings.sessionId, sessionId))
|
|
10
|
+
.limit(1);
|
|
11
|
+
if (!binding)
|
|
12
|
+
throw new Error("Agent Rig binding was not found for skill reconciliation");
|
|
13
|
+
return join(dirname(binding.cwd), "home");
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=agentSkillHomeGet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentSkillHomeGet.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentSkillHomeGet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,sNAAsN;AACtN,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACnC,QAAyB,EACzB,SAAiB;IAEjB,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,QAAQ;SAC3B,MAAM,CAAC,EAAE,GAAG,EAAE,gBAAgB,CAAC,GAAG,EAAE,CAAC;SACrC,IAAI,CAAC,gBAAgB,CAAC;SACtB,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;SAChD,KAAK,CAAC,CAAC,CAAC,CAAC;IACd,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC1F,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentSkillHomeGet.test.d.ts","sourceRoot":"","sources":["../../../sources/modules/agent/agentSkillHomeGet.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { describe, expect, it, vi } from "vitest";
|
|
2
|
+
import { agentSkillHomeGet } from "./agentSkillHomeGet.js";
|
|
3
|
+
function executorWithBinding(binding) {
|
|
4
|
+
const limit = vi.fn().mockResolvedValue(binding ? [binding] : []);
|
|
5
|
+
const where = vi.fn(() => ({ limit }));
|
|
6
|
+
const from = vi.fn(() => ({ where }));
|
|
7
|
+
return { select: vi.fn(() => ({ from })) };
|
|
8
|
+
}
|
|
9
|
+
describe("agentSkillHomeGet", () => {
|
|
10
|
+
it("derives the isolated home beside the durable Rig working directory", async () => {
|
|
11
|
+
await expect(agentSkillHomeGet(executorWithBinding({ cwd: "/sessions/run/worktree" }), "session-1")).resolves.toBe("/sessions/run/home");
|
|
12
|
+
});
|
|
13
|
+
it("rejects sessions without a durable Rig binding", async () => {
|
|
14
|
+
await expect(agentSkillHomeGet(executorWithBinding(undefined), "missing")).rejects.toThrow("Agent Rig binding was not found for skill reconciliation");
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=agentSkillHomeGet.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentSkillHomeGet.test.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentSkillHomeGet.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAA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string;
|
|
4
|
+
username: string;
|
|
5
|
+
firstName: string;
|
|
6
|
+
lastName?: string;
|
|
7
|
+
kind: "human" | "agent";
|
|
8
|
+
triggeredTurn: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Resolves the exact running agent turn, its triggering sender, and every concrete user mention recorded on that message.
|
|
12
|
+
* This read-only boundary keeps plugin capabilities tied to durable turn provenance instead of inferring authority from a reusable Rig session.
|
|
13
|
+
*/
|
|
14
|
+
export declare function agentTurnGetPluginContext(executor: DrizzleExecutor, input: {
|
|
15
|
+
runId: string;
|
|
16
|
+
sessionId: string;
|
|
17
|
+
}): Promise<{
|
|
18
|
+
agentUserId: string;
|
|
19
|
+
chatId: string;
|
|
20
|
+
triggeredByUserId: string;
|
|
21
|
+
users: AgentPluginReferencedUser[];
|
|
22
|
+
} | undefined>;
|
|
23
|
+
//# sourceMappingURL=agentTurnGetPluginContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentTurnGetPluginContext.d.ts","sourceRoot":"","sources":["../../../sources/modules/agent/agentTurnGetPluginContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,MAAM,WAAW,yBAAyB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAsB,yBAAyB,CAC3C,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAC5C,OAAO,CACJ;IACI,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,yBAAyB,EAAE,CAAC;CACtC,GACD,SAAS,CACd,CAuEA"}
|