

const require_constants = require('../../constants.js');
const require_AgentConfig = require('../AgentConfig.js');

//#region src/agent/context/AgentContext.ts
var AgentContext = class {
	constructor({ dependencyManager, contextCorrelationId, isRootAgentContext = false }) {
		this.dependencyManager = dependencyManager;
		this.contextCorrelationId = contextCorrelationId;
		this.isRootAgentContext = isRootAgentContext;
	}
	/**
	* Convenience method to access the agent config for the current context.
	*/
	get config() {
		return this.dependencyManager.resolve(require_AgentConfig.AgentConfig);
	}
	/**
	* End session the current agent context
	*/
	async endSession() {
		await this.dependencyManager.resolve(require_constants.InjectionSymbols.AgentContextProvider).endSessionForAgentContext(this);
	}
	toJSON() {
		return { contextCorrelationId: this.contextCorrelationId };
	}
	/**
	* Resolve a dependency
	*/
	resolve(token) {
		return this.dependencyManager.resolve(token);
	}
};

//#endregion
exports.AgentContext = AgentContext;