happy2 0.0.11 → 0.0.13
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/README.md +10 -0
- package/package.json +2 -2
- package/packages/happy2-server/PLUGINS.md +205 -45
- package/packages/happy2-server/README.md +19 -7
- package/packages/happy2-server/dist/daemon.d.ts +39 -0
- package/packages/happy2-server/dist/daemon.d.ts.map +1 -0
- package/packages/happy2-server/dist/daemon.js +302 -0
- package/packages/happy2-server/dist/daemon.js.map +1 -0
- package/packages/happy2-server/dist/daemon.test.d.ts +2 -0
- package/packages/happy2-server/dist/daemon.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/daemon.test.js +245 -0
- package/packages/happy2-server/dist/daemon.test.js.map +1 -0
- package/packages/happy2-server/dist/index.d.ts +3 -2
- package/packages/happy2-server/dist/index.d.ts.map +1 -1
- package/packages/happy2-server/dist/index.js +2 -1
- 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/agentChatGetIdBySession.d.ts +7 -0
- package/packages/happy2-server/dist/modules/agent/agentChatGetIdBySession.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agent/agentChatGetIdBySession.js +15 -0
- package/packages/happy2-server/dist/modules/agent/agentChatGetIdBySession.js.map +1 -0
- 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/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 +13 -6
- package/packages/happy2-server/dist/modules/agents/service.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agents/service.js +497 -49
- 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 +13 -0
- package/packages/happy2-server/dist/modules/auth/tokens.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/auth/tokens.js +59 -0
- package/packages/happy2-server/dist/modules/auth/tokens.js.map +1 -1
- package/packages/happy2-server/dist/modules/auth/tokens.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/auth/tokens.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/tokens.test.js +48 -0
- package/packages/happy2-server/dist/modules/auth/tokens.test.js.map +1 -0
- 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/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 +3 -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 +9 -0
- package/packages/happy2-server/dist/modules/config/loader.js.map +1 -1
- package/packages/happy2-server/dist/modules/config/loader.test.js +27 -0
- package/packages/happy2-server/dist/modules/config/loader.test.js.map +1 -1
- package/packages/happy2-server/dist/modules/config/type.d.ts +5 -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 +75 -15
- package/packages/happy2-server/dist/modules/plugin/catalog.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/catalog.test.js +37 -0
- 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/asInstallation.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/impl/asInstallation.js +3 -2
- package/packages/happy2-server/dist/modules/plugin/impl/asInstallation.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/impl/asPlugin.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/impl/asPlugin.js +17 -3
- package/packages/happy2-server/dist/modules/plugin/impl/asPlugin.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/impl/effectiveContainer.d.ts +3 -0
- package/packages/happy2-server/dist/modules/plugin/impl/effectiveContainer.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/effectiveContainer.js +12 -0
- package/packages/happy2-server/dist/modules/plugin/impl/effectiveContainer.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.js +11 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.js.map +1 -1
- 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/packageStore.d.ts +13 -0
- package/packages/happy2-server/dist/modules/plugin/packageStore.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/packageStore.js +122 -14
- package/packages/happy2-server/dist/modules/plugin/packageStore.js.map +1 -1
- 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 +15 -1
- package/packages/happy2-server/dist/modules/plugin/pluginCatalogList.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceAuthorize.d.ts +10 -0
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceAuthorize.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceAuthorize.js +20 -0
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceAuthorize.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceInvalidate.d.ts +12 -0
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceInvalidate.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceInvalidate.js +44 -0
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceInvalidate.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.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginInstall.js +28 -9
- package/packages/happy2-server/dist/modules/plugin/pluginInstall.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.js +18 -7
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.js.map +1 -1
- 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/pluginInstallationListForHost.d.ts +14 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationListForHost.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationListForHost.js +20 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationListForHost.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationUpdateStatus.d.ts +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationUpdateStatus.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationUpdateStatus.js +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationUpdateStatus.js.map +1 -1
- 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/pluginMcpToolsList.d.ts +11 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsList.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsList.js +43 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsList.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsListReady.d.ts +15 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsListReady.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsListReady.js +37 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsListReady.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsReplace.d.ts +16 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsReplace.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsReplace.js +71 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsReplace.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 +20 -0
- package/packages/happy2-server/dist/modules/plugin/runtime.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/runtime.js +88 -2
- package/packages/happy2-server/dist/modules/plugin/runtime.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/service.d.ts +64 -5
- package/packages/happy2-server/dist/modules/plugin/service.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/service.js +552 -173
- 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 +87 -11
- package/packages/happy2-server/dist/modules/plugin/types.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/types.js +1 -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/index.d.ts +1 -1
- package/packages/happy2-server/dist/modules/sandbox/index.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.d.ts +8 -1
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.js +105 -3
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.js.map +1 -1
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.test.js +82 -3
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.test.js.map +1 -1
- package/packages/happy2-server/dist/modules/sandbox/types.d.ts +17 -0
- package/packages/happy2-server/dist/modules/sandbox/types.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/schema.d.ts +2245 -233
- package/packages/happy2-server/dist/modules/schema.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/schema.js +120 -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 +6 -0
- package/packages/happy2-server/dist/routes/pluginHost.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/pluginHost.js +106 -0
- package/packages/happy2-server/dist/routes/pluginHost.js.map +1 -0
- package/packages/happy2-server/dist/routes/plugins.d.ts.map +1 -1
- package/packages/happy2-server/dist/routes/plugins.js +159 -5
- package/packages/happy2-server/dist/routes/plugins.js.map +1 -1
- package/packages/happy2-server/dist/runner.js +20 -1
- package/packages/happy2-server/dist/runner.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 +23 -1
- package/packages/happy2-server/dist/server.js.map +1 -1
- package/packages/happy2-server/dist/systemService.d.ts.map +1 -1
- package/packages/happy2-server/dist/systemService.js +16 -1
- package/packages/happy2-server/dist/systemService.js.map +1 -1
- package/packages/happy2-server/dist/systemService.test.js +15 -1
- package/packages/happy2-server/dist/systemService.test.js.map +1 -1
- package/packages/happy2-server/dist/web/assets/index-BaPUPGPe.css +2 -0
- package/packages/happy2-server/dist/web/assets/index-BnhFxR3U.js +39 -0
- package/packages/happy2-server/dist/web/index.html +2 -2
- package/packages/happy2-server/drizzle/0022_plugin_container_runtime_tools.sql +16 -0
- 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/meta/_journal.json +42 -0
- package/packages/happy2-server/happy2.example.toml +14 -0
- package/packages/happy2-server/plugins/README.md +3 -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 +113 -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,7 +1,7 @@
|
|
|
1
1
|
import { type UserSummary } from "../chat/types.js";
|
|
2
2
|
import { type DrizzleExecutor } from "../drizzle.js";
|
|
3
3
|
/**
|
|
4
|
-
* Validates an
|
|
4
|
+
* Validates an assignImagesToChats-authorized change against a live agent, a ready image, all Rig bindings, and unfinished turns.
|
|
5
5
|
* Rejecting a different image while work is pending prevents the later mutation from switching the execution substrate beneath an active turn.
|
|
6
6
|
*/
|
|
7
7
|
export declare function agentImageGetChangeContext(executor: DrizzleExecutor, input: {
|
|
@@ -13,6 +13,7 @@ export declare function agentImageGetChangeContext(executor: DrizzleExecutor, in
|
|
|
13
13
|
chatId: string;
|
|
14
14
|
containerName: string;
|
|
15
15
|
cwd: string;
|
|
16
|
+
effort?: string;
|
|
16
17
|
sessionId: string;
|
|
17
18
|
}>;
|
|
18
19
|
currentImageId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentImageGetChangeContext.d.ts","sourceRoot":"","sources":["../../../sources/modules/agent/agentImageGetChangeContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAWrD;;;GAGG;AACH,wBAAsB,0BAA0B,CAC5C,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACnB,GACF,OAAO,CAAC;IACP,QAAQ,EAAE,KAAK,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,aAAa,EAAE,MAAM,CAAC;QACtB,GAAG,EAAE,MAAM,CAAC;QACZ,SAAS,EAAE,MAAM,CAAC;KACrB,CAAC,CAAC;IACH,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE;QACH,aAAa,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,EAAE,EAAE,MAAM,CAAC;KACd,CAAC;IACF,IAAI,EAAE,WAAW,CAAC;CACrB,CAAC,
|
|
1
|
+
{"version":3,"file":"agentImageGetChangeContext.d.ts","sourceRoot":"","sources":["../../../sources/modules/agent/agentImageGetChangeContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAWrD;;;GAGG;AACH,wBAAsB,0BAA0B,CAC5C,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACnB,GACF,OAAO,CAAC;IACP,QAAQ,EAAE,KAAK,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,aAAa,EAAE,MAAM,CAAC;QACtB,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;KACrB,CAAC,CAAC;IACH,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE;QACH,aAAa,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,EAAE,EAAE,MAAM,CAAC;KACd,CAAC;IACF,IAAI,EAAE,WAAW,CAAC;CACrB,CAAC,CA8ED"}
|
|
@@ -5,13 +5,13 @@ import { and, eq, inArray, isNull } from "drizzle-orm";
|
|
|
5
5
|
import { asUser } from "../chat/asUser.js";
|
|
6
6
|
import { optionalText } from "../chat/optionalText.js";
|
|
7
7
|
import { userSelection } from "../chat/userSelection.js";
|
|
8
|
-
import {
|
|
8
|
+
import { userRequirePermission } from "../permission/userRequirePermission.js";
|
|
9
9
|
/**
|
|
10
|
-
* Validates an
|
|
10
|
+
* Validates an assignImagesToChats-authorized change against a live agent, a ready image, all Rig bindings, and unfinished turns.
|
|
11
11
|
* Rejecting a different image while work is pending prevents the later mutation from switching the execution substrate beneath an active turn.
|
|
12
12
|
*/
|
|
13
13
|
export async function agentImageGetChangeContext(executor, input) {
|
|
14
|
-
await
|
|
14
|
+
await userRequirePermission(executor, input.actorUserId, "assignImagesToChats");
|
|
15
15
|
const [agent, image, bindings, unfinished] = await Promise.all([
|
|
16
16
|
executor
|
|
17
17
|
.select(userSelection)
|
|
@@ -35,6 +35,7 @@ export async function agentImageGetChangeContext(executor, input) {
|
|
|
35
35
|
chatId: agentRigBindings.chatId,
|
|
36
36
|
containerName: agentRigBindings.containerName,
|
|
37
37
|
cwd: agentRigBindings.cwd,
|
|
38
|
+
effort: agentRigBindings.effort,
|
|
38
39
|
sessionId: agentRigBindings.sessionId,
|
|
39
40
|
})
|
|
40
41
|
.from(agentRigBindings)
|
|
@@ -61,7 +62,13 @@ export async function agentImageGetChangeContext(executor, input) {
|
|
|
61
62
|
if (unfinished && currentImageId !== image.id)
|
|
62
63
|
throw new CollaborationError("conflict", "Agent image cannot be changed while the agent has unfinished work");
|
|
63
64
|
return {
|
|
64
|
-
bindings
|
|
65
|
+
bindings: bindings.map((binding) => ({
|
|
66
|
+
chatId: binding.chatId,
|
|
67
|
+
containerName: binding.containerName,
|
|
68
|
+
cwd: binding.cwd,
|
|
69
|
+
...(binding.effort ? { effort: binding.effort } : {}),
|
|
70
|
+
sessionId: binding.sessionId,
|
|
71
|
+
})),
|
|
65
72
|
currentImageId,
|
|
66
73
|
image: {
|
|
67
74
|
id: image.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentImageGetChangeContext.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentImageGetChangeContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAoB,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAwB,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"agentImageGetChangeContext.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentImageGetChangeContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAoB,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAwB,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO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KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa;QAChD,MAAM,IAAI,kBAAkB,CAAC,UAAU,EAAE,0BAA0B,CAAC,CAAC;IACzE,IAAI,UAAU,IAAI,cAAc,KAAK,KAAK,CAAC,EAAE;QACzC,MAAM,IAAI,kBAAkB,CACxB,UAAU,EACV,mEAAmE,CACtE,CAAC;IACN,OAAO;QACH,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACjC,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACrD,SAAS,EAAE,OAAO,CAAC,SAAS;SAC/B,CAAC,CAAC;QACH,cAAc;QACd,KAAK,EAAE;YACH,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,SAAS,EAAE,KAAK,CAAC,SAAS;SAC7B;QACD,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC;KACtB,CAAC;AACN,CAAC"}
|
|
@@ -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,
|
|
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,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAChC,QAAyB,EACzB,WAAmB;IAKnB,MAAM,wBAAwB,CAAC,QAAQ,EAAE,WAAW,EAAE;QAClD,cAAc;QACd,qBAAqB;QACrB,eAAe;KAClB,CAAC,CAAC;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACzC,QAAQ;aACH,MAAM,CAAC;YACJ,cAAc,EAAE,kBAAkB,CAAC,cAAc;SACpD,CAAC;aACD,IAAI,CAAC,kBAAkB,CAAC;aACxB,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;aACnC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5B,QAAQ;aACH,MAAM,CAAC,mBAAmB,CAAC;aAC3B,IAAI,CAAC,WAAW,CAAC;aACjB,OAAO,CAAC,WAAW,CAAC,SAAS,EAAE,WAAW,CAAC,EAAE,CAAC;KACtD,CAAC,CAAC;IACH,OAAO;QACH,GAAG,CAAC,QAAQ,EAAE,cAAc;YACxB,CAAC,CAAC;gBACI,cAAc,EAAE,QAAQ,CAAC,cAAc;aAC1C;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;AAEjG,OAAO,EAAwB,eAAe,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,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":"agentImageRequestBuild.js","sourceRoot":"","sources":["../../../sources/modules/agent/agentImageRequestBuild.ts"],"names":[],"m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AAC,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/agentImageSetD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C,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,6BAA6B,CAAC;AAC/D,OAAO,EAAE,
|
|
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,6BAA6B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAE/E;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC7C,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,EAAE;aACH,MAAM,CAAC,2BAA2B,CAAC;aACnC,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;QACrE,MAAM,EAAE;aACH,MAAM,CAAC,6BAA6B,CAAC;aACrC,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,EAAE,CAAC,CAAC;QAC5C,MAAM,eAAe,CAAC,EAAE,EAAE;YACtB,QAAQ;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,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K,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,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":"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,MAAM,4BAA4B,CA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,QAAQ,GAAG,MAAM,gBAAgB,CAAC,EAAE,CAAC,CAAC;QAC5C,MAAM,eAAe,CAAC,EAAE,EAAE;YACtB,QAAQ;YACR,IAAI,EAAE,6BAA6B;YACnC,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,gCAAgC;YACxC,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,7 +1,7 @@
|
|
|
1
1
|
import { type MutationHint } from "../chat/types.js";
|
|
2
2
|
import { type DrizzleExecutor } 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,MAAM,aAAa,CAAC;AACvD,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,6BAA6B,CAAC;AAC/D,OAAO,EAAE,
|
|
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,MAAM,a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AS,CAAC;YACP,QAAQ,EAAE,6BAA6B,CAAC,QAAQ;SACnD,CAAC,CAAC;QACP,IAAI,CAAC,QAAQ,CAAC,MAAM;YAAE,OAAO,SAAS,CAAC;QACvC,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,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,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,MAAM,cAAc,CAAC;AAC3D,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,6BAA6B,CAAC;AAC/D,OAAO,EAAE,
|
|
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,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,EAAE,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U,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,6BAA6B,CAAC;AAC/D,OAAO,EAAE,
|
|
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,6BAA6B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,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 -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,MAA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CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type DrizzleExecutor } from "../drizzle.js";
|
|
2
2
|
import { type MessageSummary, type MutationHint } from "../chat/types.js";
|
|
3
|
+
import type { AgentTurnBackgroundTerminalSummary, AgentTurnSubagentSummary, AgentTurnTraceUpdate } from "./types.js";
|
|
3
4
|
/**
|
|
4
5
|
* Applies the next leased turn output chunk to agentTurns and its visible messages projection in sequence order.
|
|
5
6
|
* Committing checkpoint and chat delivery state together makes retries idempotent and keeps partial stream output resumable.
|
|
@@ -13,6 +14,9 @@ export declare function agentTurnStreamReply(executor: DrizzleExecutor, input: {
|
|
|
13
14
|
streamCommittedText: string;
|
|
14
15
|
userMessageId: string;
|
|
15
16
|
text: string;
|
|
17
|
+
traceUpdates: readonly AgentTurnTraceUpdate[];
|
|
18
|
+
subagents?: readonly AgentTurnSubagentSummary[];
|
|
19
|
+
backgroundTerminals?: readonly AgentTurnBackgroundTerminalSummary[];
|
|
16
20
|
workerId: string;
|
|
17
21
|
}): Promise<{
|
|
18
22
|
applied: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentTurnStreamReply.d.ts","sourceRoot":"","sources":["../../../sources/modules/agent/agentTurnStreamReply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"agentTurnStreamReply.d.ts","sourceRoot":"","sources":["../../../sources/modules/agent/agentTurnStreamReply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAG1E,OAAO,KAAK,EACR,kCAAkC,EAClC,wBAAwB,EACxB,oBAAoB,EACvB,MAAM,YAAY,CAAC;AAoBpB;;;GAGG;AACH,wBAAsB,oBAAoB,CACtC,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC9C,SAAS,CAAC,EAAE,SAAS,wBAAwB,EAAE,CAAC;IAChD,mBAAmB,CAAC,EAAE,SAAS,kCAAkC,EAAE,CAAC;IACpE,QAAQ,EAAE,MAAM,CAAC;CACpB,GACF,OAAO,CAAC;IACP,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,IAAI,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC,CAgPD"}
|