MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / permissionOptions

Method permissionOptions

packages/agent-core/src/session/index.ts:838–852  ·  view source on GitHub ↗
(
    parentAgentId: string | null,
    input?: PermissionManagerOptions | undefined,
  )

Source from the content-addressed store, hash-verified

836 }
837
838 private permissionOptions(
839 parentAgentId: string | null,
840 input?: PermissionManagerOptions | undefined,
841 ): PermissionManagerOptions {
842 if (parentAgentId === null) {
843 return {
844 ...input,
845 initialRules: input?.initialRules ?? this.options.permissionRules,
846 };
847 }
848 return {
849 ...input,
850 parent: input?.parent ?? this.getReadyAgent(parentAgentId)?.permission,
851 };
852 }
853
854 getReadyAgent(id: string): Agent | undefined {
855 const entry = this.agents.get(id);

Callers 1

instantiateAgentMethod · 0.95

Calls 1

getReadyAgentMethod · 0.95

Tested by

no test coverage detected