Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integ-tests/add-agent-auth.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -116,7 +116,7 @@ describe('integration: add BYO agent with CUSTOM_JWT auth', () => {
// Verify OAuth credential was auto-created
const oauthCred = config.credentials.find(c => c.name === `${agent2}-oauth`);
expect(oauthCred, 'OAuth credential should be auto-created').toBeTruthy();
expect(oauthCred!.type).toBe('OAuthCredentialProvider');
expect(oauthCred!.authorizerType).toBe('OAuthCredentialProvider');
expect((oauthCred as { managed?: boolean }).managed).toBe(true);

// Verify .env.local has client secrets (namespaced per credential)
Expand Down
88 changes: 53 additions & 35 deletions schemas/agentcore.schema.v1.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,10 +41,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreRuntime"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -134,10 +130,6 @@
},
"additionalProperties": false
},
"modelProvider": {
"type": "string",
"enum": ["Bedrock", "Gemini", "OpenAI", "Anthropic"]
},
"protocol": {
"type": "string",
"enum": ["HTTP", "MCP", "A2A"]
Expand DownExpand Up@@ -277,7 +269,7 @@
"additionalProperties": false
}
},
"required": ["type", "name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"required": ["name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"additionalProperties": false
}
},
Expand All@@ -287,10 +279,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreMemory"
},
"name": {
"type": "string",
"minLength": 1,
Expand All@@ -310,7 +298,7 @@
"properties": {
"type": {
"type": "string",
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC"]
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC", "CUSTOM"]
},
"name": {
"type": "string",
Expand All@@ -332,6 +320,44 @@
"items": {
"type": "string"
}
},
"semanticOverride": {
"type": "object",
"properties": {
"extraction": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
},
"consolidation": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": ["type"],
Expand All@@ -353,7 +379,7 @@
}
}
},
"required": ["type", "name", "eventExpiryDuration"],
"required": ["name", "eventExpiryDuration"],
"additionalProperties": false
}
},
Expand All@@ -365,32 +391,32 @@
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "ApiKeyCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "OAuthCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
},
"discoveryUrl": {
"type": "string",
Expand All@@ -414,7 +440,7 @@
"enum": ["inbound", "outbound"]
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
}
]
Expand All@@ -426,10 +452,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "CustomEvaluator"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -527,7 +549,7 @@
}
}
},
"required": ["type", "name", "level", "config"],
"required": ["name", "level", "config"],
"additionalProperties": false
}
},
Expand All@@ -537,10 +559,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "OnlineEvaluationConfig"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -586,7 +604,7 @@
}
}
},
"required": ["type", "name", "agent", "evaluators", "samplingRate"],
"required": ["name", "agent", "evaluators", "samplingRate"],
"additionalProperties": false
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-gateway.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -190,7 +190,7 @@ describe('add gateway command', () => {
// Verify managed OAuth credential in agentcore.json
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === `${gatewayName}-oauth`);
expect(credential, 'Managed OAuth credential should exist').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.managed).toBe(true);
expect(credential.usage).toBe('inbound');
});
Expand Down
4 changes: 2 additions & 2 deletions src/cli/commands/add/__tests__/add-identity.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -61,7 +61,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('ApiKeyCredentialProvider');
expect(credential.authorizerType).toBe('ApiKeyCredentialProvider');
});
});

Expand DownExpand Up@@ -98,7 +98,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.discoveryUrl).toBe('https://idp.example.com/.well-known/openid-configuration');
expect(credential.vendor).toBe('CustomOauth2');
expect(credential.scopes).toEqual(['read', 'write']);
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -82,7 +82,7 @@ describe('add memory command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const memory = projectSpec.memories.find((m: { name: string }) => m.name === memoryName);
expect(memory, 'Memory should be in project memories').toBeTruthy();
expect(memory.type).toBe('AgentCoreMemory');
expect(memory).toBeTruthy();
});

it('creates memory with multiple strategies', async () => {
Expand Down
8 changes: 1 addition & 7 deletions src/cli/commands/dev/command.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -183,11 +183,6 @@ export const registerDev = (program: Command) => {
if (protocol === 'A2A') invokePort = 9000;
else if (protocol === 'MCP') invokePort = 8000;

// Show model info if available (not applicable to MCP)
if (protocol !== 'MCP' && targetAgent?.modelProvider) {
console.log(`Provider: ${targetAgent.modelProvider}`);
}

// Protocol-aware dispatch
if (protocol === 'MCP') {
await handleMcpInvoke(invokePort, opts.invoke, opts.tool, opts.input, headers);
Expand DownExpand Up@@ -270,8 +265,7 @@ export const registerDev = (program: Command) => {
}

// Get provider info from agent config
const targetAgent = project.agents.find(a => a.name === config.agentName);
const providerInfo = targetAgent?.modelProvider ?? '(see agent code)';
const providerInfo = '(see agent code)';

console.log(`Starting dev server...`);
console.log(`Agent: ${config.agentName}`);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,6 @@
"version": 1,
"agents": [
{
"type": "AgentCoreRuntime",
"name": "existing_agent",
"build": "CodeZip",
"entrypoint": "main.py",
Expand All@@ -18,7 +17,6 @@
],
"memories": [
{
"type": "AgentCoreMemory",
"name": "existing_agent_memory",
"eventExpiryDuration": 30,
"strategies": [
Expand All@@ -30,7 +28,7 @@
],
"credentials": [
{
"type": "ApiKeyCredentialProvider",
"authorizerType": "ApiKeyCredentialProvider",
"name": "my_api_key"
}
],
Expand Down
4 changes: 1 addition & 3 deletions src/cli/commands/import/__tests__/idempotency.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -176,7 +176,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
name: 'TestProject',
version: 1,
agents: agents.map(a => ({
type: 'AgentCoreRuntime',
name: a.name,
build: 'CodeZip',
entrypoint: 'main.py',
Expand All@@ -187,7 +186,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
instrumentation: { enableOtel: true },
})),
memories: memories.map(m => ({
type: 'AgentCoreMemory',
name: m.name,
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand DownExpand Up@@ -529,7 +527,7 @@ describe('Import Idempotency (Test Group 7)', () => {
);

const existingSpec = makeProjectSpec();
(existingSpec as any).credentials = [{ type: 'ApiKeyCredentialProvider', name: 'my-cred' }];
(existingSpec as any).credentials = [{ authorizerType: 'ApiKeyCredentialProvider', name: 'my-cred' }];
mockConfigIOInstance.readProjectSpec.mockResolvedValue(existingSpec);

const progressMessages: string[] = [];
Expand Down
4 changes: 0 additions & 4 deletions src/cli/commands/import/__tests__/import-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,7 +37,6 @@ function toMemorySpec(mem: ParsedStarterToolkitMemory): Memory {
}

return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
Expand DownExpand Up@@ -367,7 +366,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('test_memory');
expect(result.eventExpiryDuration).toBe(30);
expect(result.strategies).toHaveLength(3);
Expand All@@ -384,7 +382,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('stm_memory');
expect(result.eventExpiryDuration).toBe(14);
expect(result.strategies).toHaveLength(0);
Expand DownExpand Up@@ -505,7 +502,6 @@ describe('Memory Merge Logic', () => {
it('skips existing memories by name', () => {
const existingMemories: Memory[] = [
{
type: 'AgentCoreMemory',
name: 'existing_memory',
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -557,7 +557,6 @@ agents:
const writtenSpec = mockWriteProjectSpec.mock.calls[0]![0];
expect(writtenSpec.memories).toHaveLength(1);
expect(writtenSpec.memories[0].name).toBe('test_agent_memory');
expect(writtenSpec.memories[0].type).toBe('AgentCoreMemory');
});

it('does NOT call CDK build/synth operations', async () => {
Expand Down
6 changes: 2 additions & 4 deletions src/cli/commands/import/__tests__/merge-logic.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,6 @@ function toAgentEnvSpec(agent: ParsedStarterToolkitConfig['agents'][0]): AgentEn
const codeLocation = path.join(APP_DIR, agent.name);
const entrypoint = path.basename(agent.entrypoint);
const spec: AgentEnvSpec = {
type: 'AgentCoreRuntime',
name: agent.name,
build: agent.build,
entrypoint: entrypoint as AgentEnvSpec['entrypoint'],
Expand All@@ -39,15 +38,14 @@ function toMemorySpec(mem: ParsedStarterToolkitConfig['memories'][0]): Memory {
strategies.push({ type: 'USER_PREFERENCE' });
}
return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
};
}

function toCredentialSpec(cred: ParsedStarterToolkitConfig['credentials'][0]): Credential {
return { type: 'ApiKeyCredentialProvider', name: cred.name };
return { authorizerType: 'ApiKeyCredentialProvider', name: cred.name };
}

function simulateMerge(
Expand DownExpand Up@@ -159,7 +157,7 @@ describe('merge: credential deduplication', () => {
});
it('skips credential with same name', () => {
const projectSpec = loadCliProjectSpec();
projectSpec.credentials.push({ type: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
projectSpec.credentials.push({ authorizerType: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
const parsed = parseStarterToolkitYaml(DIFFERENT_AGENT_YAML);
const { messages } = simulateMerge(projectSpec, parsed);
expect(messages).toContain('Skipping credential "new_api_key_cred" (already exists in project)');
Expand Down
Loading
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integ-tests/add-agent-auth.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -116,7 +116,7 @@ describe('integration: add BYO agent with CUSTOM_JWT auth', () => {
// Verify OAuth credential was auto-created
const oauthCred = config.credentials.find(c => c.name === `${agent2}-oauth`);
expect(oauthCred, 'OAuth credential should be auto-created').toBeTruthy();
expect(oauthCred!.type).toBe('OAuthCredentialProvider');
expect(oauthCred!.authorizerType).toBe('OAuthCredentialProvider');
expect((oauthCred as { managed?: boolean }).managed).toBe(true);

// Verify .env.local has client secrets (namespaced per credential)
Expand Down
88 changes: 53 additions & 35 deletions schemas/agentcore.schema.v1.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,10 +41,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreRuntime"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -134,10 +130,6 @@
},
"additionalProperties": false
},
"modelProvider": {
"type": "string",
"enum": ["Bedrock", "Gemini", "OpenAI", "Anthropic"]
},
"protocol": {
"type": "string",
"enum": ["HTTP", "MCP", "A2A"]
Expand DownExpand Up@@ -277,7 +269,7 @@
"additionalProperties": false
}
},
"required": ["type", "name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"required": ["name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"additionalProperties": false
}
},
Expand All@@ -287,10 +279,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreMemory"
},
"name": {
"type": "string",
"minLength": 1,
Expand All@@ -310,7 +298,7 @@
"properties": {
"type": {
"type": "string",
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC"]
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC", "CUSTOM"]
},
"name": {
"type": "string",
Expand All@@ -332,6 +320,44 @@
"items": {
"type": "string"
}
},
"semanticOverride": {
"type": "object",
"properties": {
"extraction": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
},
"consolidation": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": ["type"],
Expand All@@ -353,7 +379,7 @@
}
}
},
"required": ["type", "name", "eventExpiryDuration"],
"required": ["name", "eventExpiryDuration"],
"additionalProperties": false
}
},
Expand All@@ -365,32 +391,32 @@
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "ApiKeyCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "OAuthCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
},
"discoveryUrl": {
"type": "string",
Expand All@@ -414,7 +440,7 @@
"enum": ["inbound", "outbound"]
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
}
]
Expand All@@ -426,10 +452,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "CustomEvaluator"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -527,7 +549,7 @@
}
}
},
"required": ["type", "name", "level", "config"],
"required": ["name", "level", "config"],
"additionalProperties": false
}
},
Expand All@@ -537,10 +559,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "OnlineEvaluationConfig"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -586,7 +604,7 @@
}
}
},
"required": ["type", "name", "agent", "evaluators", "samplingRate"],
"required": ["name", "agent", "evaluators", "samplingRate"],
"additionalProperties": false
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-gateway.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -190,7 +190,7 @@ describe('add gateway command', () => {
// Verify managed OAuth credential in agentcore.json
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === `${gatewayName}-oauth`);
expect(credential, 'Managed OAuth credential should exist').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.managed).toBe(true);
expect(credential.usage).toBe('inbound');
});
Expand Down
4 changes: 2 additions & 2 deletions src/cli/commands/add/__tests__/add-identity.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -61,7 +61,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('ApiKeyCredentialProvider');
expect(credential.authorizerType).toBe('ApiKeyCredentialProvider');
});
});

Expand DownExpand Up@@ -98,7 +98,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.discoveryUrl).toBe('https://idp.example.com/.well-known/openid-configuration');
expect(credential.vendor).toBe('CustomOauth2');
expect(credential.scopes).toEqual(['read', 'write']);
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -82,7 +82,7 @@ describe('add memory command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const memory = projectSpec.memories.find((m: { name: string }) => m.name === memoryName);
expect(memory, 'Memory should be in project memories').toBeTruthy();
expect(memory.type).toBe('AgentCoreMemory');
expect(memory).toBeTruthy();
});

it('creates memory with multiple strategies', async () => {
Expand Down
8 changes: 1 addition & 7 deletions src/cli/commands/dev/command.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -183,11 +183,6 @@ export const registerDev = (program: Command) => {
if (protocol === 'A2A') invokePort = 9000;
else if (protocol === 'MCP') invokePort = 8000;

// Show model info if available (not applicable to MCP)
if (protocol !== 'MCP' && targetAgent?.modelProvider) {
console.log(`Provider: ${targetAgent.modelProvider}`);
}

// Protocol-aware dispatch
if (protocol === 'MCP') {
await handleMcpInvoke(invokePort, opts.invoke, opts.tool, opts.input, headers);
Expand DownExpand Up@@ -270,8 +265,7 @@ export const registerDev = (program: Command) => {
}

// Get provider info from agent config
const targetAgent = project.agents.find(a => a.name === config.agentName);
const providerInfo = targetAgent?.modelProvider ?? '(see agent code)';
const providerInfo = '(see agent code)';

console.log(`Starting dev server...`);
console.log(`Agent: ${config.agentName}`);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,6 @@
"version": 1,
"agents": [
{
"type": "AgentCoreRuntime",
"name": "existing_agent",
"build": "CodeZip",
"entrypoint": "main.py",
Expand All@@ -18,7 +17,6 @@
],
"memories": [
{
"type": "AgentCoreMemory",
"name": "existing_agent_memory",
"eventExpiryDuration": 30,
"strategies": [
Expand All@@ -30,7 +28,7 @@
],
"credentials": [
{
"type": "ApiKeyCredentialProvider",
"authorizerType": "ApiKeyCredentialProvider",
"name": "my_api_key"
}
],
Expand Down
4 changes: 1 addition & 3 deletions src/cli/commands/import/__tests__/idempotency.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -176,7 +176,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
name: 'TestProject',
version: 1,
agents: agents.map(a => ({
type: 'AgentCoreRuntime',
name: a.name,
build: 'CodeZip',
entrypoint: 'main.py',
Expand All@@ -187,7 +186,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
instrumentation: { enableOtel: true },
})),
memories: memories.map(m => ({
type: 'AgentCoreMemory',
name: m.name,
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand DownExpand Up@@ -529,7 +527,7 @@ describe('Import Idempotency (Test Group 7)', () => {
);

const existingSpec = makeProjectSpec();
(existingSpec as any).credentials = [{ type: 'ApiKeyCredentialProvider', name: 'my-cred' }];
(existingSpec as any).credentials = [{ authorizerType: 'ApiKeyCredentialProvider', name: 'my-cred' }];
mockConfigIOInstance.readProjectSpec.mockResolvedValue(existingSpec);

const progressMessages: string[] = [];
Expand Down
4 changes: 0 additions & 4 deletions src/cli/commands/import/__tests__/import-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,7 +37,6 @@ function toMemorySpec(mem: ParsedStarterToolkitMemory): Memory {
}

return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
Expand DownExpand Up@@ -367,7 +366,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('test_memory');
expect(result.eventExpiryDuration).toBe(30);
expect(result.strategies).toHaveLength(3);
Expand All@@ -384,7 +382,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('stm_memory');
expect(result.eventExpiryDuration).toBe(14);
expect(result.strategies).toHaveLength(0);
Expand DownExpand Up@@ -505,7 +502,6 @@ describe('Memory Merge Logic', () => {
it('skips existing memories by name', () => {
const existingMemories: Memory[] = [
{
type: 'AgentCoreMemory',
name: 'existing_memory',
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -557,7 +557,6 @@ agents:
const writtenSpec = mockWriteProjectSpec.mock.calls[0]![0];
expect(writtenSpec.memories).toHaveLength(1);
expect(writtenSpec.memories[0].name).toBe('test_agent_memory');
expect(writtenSpec.memories[0].type).toBe('AgentCoreMemory');
});

it('does NOT call CDK build/synth operations', async () => {
Expand Down
6 changes: 2 additions & 4 deletions src/cli/commands/import/__tests__/merge-logic.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,6 @@ function toAgentEnvSpec(agent: ParsedStarterToolkitConfig['agents'][0]): AgentEn
const codeLocation = path.join(APP_DIR, agent.name);
const entrypoint = path.basename(agent.entrypoint);
const spec: AgentEnvSpec = {
type: 'AgentCoreRuntime',
name: agent.name,
build: agent.build,
entrypoint: entrypoint as AgentEnvSpec['entrypoint'],
Expand All@@ -39,15 +38,14 @@ function toMemorySpec(mem: ParsedStarterToolkitConfig['memories'][0]): Memory {
strategies.push({ type: 'USER_PREFERENCE' });
}
return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
};
}

function toCredentialSpec(cred: ParsedStarterToolkitConfig['credentials'][0]): Credential {
return { type: 'ApiKeyCredentialProvider', name: cred.name };
return { authorizerType: 'ApiKeyCredentialProvider', name: cred.name };
}

function simulateMerge(
Expand DownExpand Up@@ -159,7 +157,7 @@ describe('merge: credential deduplication', () => {
});
it('skips credential with same name', () => {
const projectSpec = loadCliProjectSpec();
projectSpec.credentials.push({ type: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
projectSpec.credentials.push({ authorizerType: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
const parsed = parseStarterToolkitYaml(DIFFERENT_AGENT_YAML);
const { messages } = simulateMerge(projectSpec, parsed);
expect(messages).toContain('Skipping credential "new_api_key_cred" (already exists in project)');
Expand Down
Loading
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integ-tests/add-agent-auth.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -116,7 +116,7 @@ describe('integration: add BYO agent with CUSTOM_JWT auth', () => {
// Verify OAuth credential was auto-created
const oauthCred = config.credentials.find(c => c.name === `${agent2}-oauth`);
expect(oauthCred, 'OAuth credential should be auto-created').toBeTruthy();
expect(oauthCred!.type).toBe('OAuthCredentialProvider');
expect(oauthCred!.authorizerType).toBe('OAuthCredentialProvider');
expect((oauthCred as { managed?: boolean }).managed).toBe(true);

// Verify .env.local has client secrets (namespaced per credential)
Expand Down
88 changes: 53 additions & 35 deletions schemas/agentcore.schema.v1.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,10 +41,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreRuntime"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -134,10 +130,6 @@
},
"additionalProperties": false
},
"modelProvider": {
"type": "string",
"enum": ["Bedrock", "Gemini", "OpenAI", "Anthropic"]
},
"protocol": {
"type": "string",
"enum": ["HTTP", "MCP", "A2A"]
Expand DownExpand Up@@ -277,7 +269,7 @@
"additionalProperties": false
}
},
"required": ["type", "name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"required": ["name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"additionalProperties": false
}
},
Expand All@@ -287,10 +279,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreMemory"
},
"name": {
"type": "string",
"minLength": 1,
Expand All@@ -310,7 +298,7 @@
"properties": {
"type": {
"type": "string",
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC"]
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC", "CUSTOM"]
},
"name": {
"type": "string",
Expand All@@ -332,6 +320,44 @@
"items": {
"type": "string"
}
},
"semanticOverride": {
"type": "object",
"properties": {
"extraction": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
},
"consolidation": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": ["type"],
Expand All@@ -353,7 +379,7 @@
}
}
},
"required": ["type", "name", "eventExpiryDuration"],
"required": ["name", "eventExpiryDuration"],
"additionalProperties": false
}
},
Expand All@@ -365,32 +391,32 @@
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "ApiKeyCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "OAuthCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
},
"discoveryUrl": {
"type": "string",
Expand All@@ -414,7 +440,7 @@
"enum": ["inbound", "outbound"]
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
}
]
Expand All@@ -426,10 +452,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "CustomEvaluator"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -527,7 +549,7 @@
}
}
},
"required": ["type", "name", "level", "config"],
"required": ["name", "level", "config"],
"additionalProperties": false
}
},
Expand All@@ -537,10 +559,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "OnlineEvaluationConfig"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -586,7 +604,7 @@
}
}
},
"required": ["type", "name", "agent", "evaluators", "samplingRate"],
"required": ["name", "agent", "evaluators", "samplingRate"],
"additionalProperties": false
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-gateway.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -190,7 +190,7 @@ describe('add gateway command', () => {
// Verify managed OAuth credential in agentcore.json
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === `${gatewayName}-oauth`);
expect(credential, 'Managed OAuth credential should exist').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.managed).toBe(true);
expect(credential.usage).toBe('inbound');
});
Expand Down
4 changes: 2 additions & 2 deletions src/cli/commands/add/__tests__/add-identity.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -61,7 +61,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('ApiKeyCredentialProvider');
expect(credential.authorizerType).toBe('ApiKeyCredentialProvider');
});
});

Expand DownExpand Up@@ -98,7 +98,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.discoveryUrl).toBe('https://idp.example.com/.well-known/openid-configuration');
expect(credential.vendor).toBe('CustomOauth2');
expect(credential.scopes).toEqual(['read', 'write']);
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -82,7 +82,7 @@ describe('add memory command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const memory = projectSpec.memories.find((m: { name: string }) => m.name === memoryName);
expect(memory, 'Memory should be in project memories').toBeTruthy();
expect(memory.type).toBe('AgentCoreMemory');
expect(memory).toBeTruthy();
});

it('creates memory with multiple strategies', async () => {
Expand Down
8 changes: 1 addition & 7 deletions src/cli/commands/dev/command.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -183,11 +183,6 @@ export const registerDev = (program: Command) => {
if (protocol === 'A2A') invokePort = 9000;
else if (protocol === 'MCP') invokePort = 8000;

// Show model info if available (not applicable to MCP)
if (protocol !== 'MCP' && targetAgent?.modelProvider) {
console.log(`Provider: ${targetAgent.modelProvider}`);
}

// Protocol-aware dispatch
if (protocol === 'MCP') {
await handleMcpInvoke(invokePort, opts.invoke, opts.tool, opts.input, headers);
Expand DownExpand Up@@ -270,8 +265,7 @@ export const registerDev = (program: Command) => {
}

// Get provider info from agent config
const targetAgent = project.agents.find(a => a.name === config.agentName);
const providerInfo = targetAgent?.modelProvider ?? '(see agent code)';
const providerInfo = '(see agent code)';

console.log(`Starting dev server...`);
console.log(`Agent: ${config.agentName}`);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,6 @@
"version": 1,
"agents": [
{
"type": "AgentCoreRuntime",
"name": "existing_agent",
"build": "CodeZip",
"entrypoint": "main.py",
Expand All@@ -18,7 +17,6 @@
],
"memories": [
{
"type": "AgentCoreMemory",
"name": "existing_agent_memory",
"eventExpiryDuration": 30,
"strategies": [
Expand All@@ -30,7 +28,7 @@
],
"credentials": [
{
"type": "ApiKeyCredentialProvider",
"authorizerType": "ApiKeyCredentialProvider",
"name": "my_api_key"
}
],
Expand Down
4 changes: 1 addition & 3 deletions src/cli/commands/import/__tests__/idempotency.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -176,7 +176,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
name: 'TestProject',
version: 1,
agents: agents.map(a => ({
type: 'AgentCoreRuntime',
name: a.name,
build: 'CodeZip',
entrypoint: 'main.py',
Expand All@@ -187,7 +186,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
instrumentation: { enableOtel: true },
})),
memories: memories.map(m => ({
type: 'AgentCoreMemory',
name: m.name,
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand DownExpand Up@@ -529,7 +527,7 @@ describe('Import Idempotency (Test Group 7)', () => {
);

const existingSpec = makeProjectSpec();
(existingSpec as any).credentials = [{ type: 'ApiKeyCredentialProvider', name: 'my-cred' }];
(existingSpec as any).credentials = [{ authorizerType: 'ApiKeyCredentialProvider', name: 'my-cred' }];
mockConfigIOInstance.readProjectSpec.mockResolvedValue(existingSpec);

const progressMessages: string[] = [];
Expand Down
4 changes: 0 additions & 4 deletions src/cli/commands/import/__tests__/import-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,7 +37,6 @@ function toMemorySpec(mem: ParsedStarterToolkitMemory): Memory {
}

return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
Expand DownExpand Up@@ -367,7 +366,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('test_memory');
expect(result.eventExpiryDuration).toBe(30);
expect(result.strategies).toHaveLength(3);
Expand All@@ -384,7 +382,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('stm_memory');
expect(result.eventExpiryDuration).toBe(14);
expect(result.strategies).toHaveLength(0);
Expand DownExpand Up@@ -505,7 +502,6 @@ describe('Memory Merge Logic', () => {
it('skips existing memories by name', () => {
const existingMemories: Memory[] = [
{
type: 'AgentCoreMemory',
name: 'existing_memory',
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -557,7 +557,6 @@ agents:
const writtenSpec = mockWriteProjectSpec.mock.calls[0]![0];
expect(writtenSpec.memories).toHaveLength(1);
expect(writtenSpec.memories[0].name).toBe('test_agent_memory');
expect(writtenSpec.memories[0].type).toBe('AgentCoreMemory');
});

it('does NOT call CDK build/synth operations', async () => {
Expand Down
6 changes: 2 additions & 4 deletions src/cli/commands/import/__tests__/merge-logic.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,6 @@ function toAgentEnvSpec(agent: ParsedStarterToolkitConfig['agents'][0]): AgentEn
const codeLocation = path.join(APP_DIR, agent.name);
const entrypoint = path.basename(agent.entrypoint);
const spec: AgentEnvSpec = {
type: 'AgentCoreRuntime',
name: agent.name,
build: agent.build,
entrypoint: entrypoint as AgentEnvSpec['entrypoint'],
Expand All@@ -39,15 +38,14 @@ function toMemorySpec(mem: ParsedStarterToolkitConfig['memories'][0]): Memory {
strategies.push({ type: 'USER_PREFERENCE' });
}
return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
};
}

function toCredentialSpec(cred: ParsedStarterToolkitConfig['credentials'][0]): Credential {
return { type: 'ApiKeyCredentialProvider', name: cred.name };
return { authorizerType: 'ApiKeyCredentialProvider', name: cred.name };
}

function simulateMerge(
Expand DownExpand Up@@ -159,7 +157,7 @@ describe('merge: credential deduplication', () => {
});
it('skips credential with same name', () => {
const projectSpec = loadCliProjectSpec();
projectSpec.credentials.push({ type: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
projectSpec.credentials.push({ authorizerType: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
const parsed = parseStarterToolkitYaml(DIFFERENT_AGENT_YAML);
const { messages } = simulateMerge(projectSpec, parsed);
expect(messages).toContain('Skipping credential "new_api_key_cred" (already exists in project)');
Expand Down
Loading
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integ-tests/add-agent-auth.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -116,7 +116,7 @@ describe('integration: add BYO agent with CUSTOM_JWT auth', () => {
// Verify OAuth credential was auto-created
const oauthCred = config.credentials.find(c => c.name === `${agent2}-oauth`);
expect(oauthCred, 'OAuth credential should be auto-created').toBeTruthy();
expect(oauthCred!.type).toBe('OAuthCredentialProvider');
expect(oauthCred!.authorizerType).toBe('OAuthCredentialProvider');
expect((oauthCred as { managed?: boolean }).managed).toBe(true);

// Verify .env.local has client secrets (namespaced per credential)
Expand Down
88 changes: 53 additions & 35 deletions schemas/agentcore.schema.v1.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,10 +41,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreRuntime"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -134,10 +130,6 @@
},
"additionalProperties": false
},
"modelProvider": {
"type": "string",
"enum": ["Bedrock", "Gemini", "OpenAI", "Anthropic"]
},
"protocol": {
"type": "string",
"enum": ["HTTP", "MCP", "A2A"]
Expand DownExpand Up@@ -277,7 +269,7 @@
"additionalProperties": false
}
},
"required": ["type", "name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"required": ["name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"additionalProperties": false
}
},
Expand All@@ -287,10 +279,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreMemory"
},
"name": {
"type": "string",
"minLength": 1,
Expand All@@ -310,7 +298,7 @@
"properties": {
"type": {
"type": "string",
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC"]
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC", "CUSTOM"]
},
"name": {
"type": "string",
Expand All@@ -332,6 +320,44 @@
"items": {
"type": "string"
}
},
"semanticOverride": {
"type": "object",
"properties": {
"extraction": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
},
"consolidation": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": ["type"],
Expand All@@ -353,7 +379,7 @@
}
}
},
"required": ["type", "name", "eventExpiryDuration"],
"required": ["name", "eventExpiryDuration"],
"additionalProperties": false
}
},
Expand All@@ -365,32 +391,32 @@
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "ApiKeyCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "OAuthCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
},
"discoveryUrl": {
"type": "string",
Expand All@@ -414,7 +440,7 @@
"enum": ["inbound", "outbound"]
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
}
]
Expand All@@ -426,10 +452,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "CustomEvaluator"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -527,7 +549,7 @@
}
}
},
"required": ["type", "name", "level", "config"],
"required": ["name", "level", "config"],
"additionalProperties": false
}
},
Expand All@@ -537,10 +559,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "OnlineEvaluationConfig"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -586,7 +604,7 @@
}
}
},
"required": ["type", "name", "agent", "evaluators", "samplingRate"],
"required": ["name", "agent", "evaluators", "samplingRate"],
"additionalProperties": false
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-gateway.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -190,7 +190,7 @@ describe('add gateway command', () => {
// Verify managed OAuth credential in agentcore.json
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === `${gatewayName}-oauth`);
expect(credential, 'Managed OAuth credential should exist').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.managed).toBe(true);
expect(credential.usage).toBe('inbound');
});
Expand Down
4 changes: 2 additions & 2 deletions src/cli/commands/add/__tests__/add-identity.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -61,7 +61,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('ApiKeyCredentialProvider');
expect(credential.authorizerType).toBe('ApiKeyCredentialProvider');
});
});

Expand DownExpand Up@@ -98,7 +98,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.discoveryUrl).toBe('https://idp.example.com/.well-known/openid-configuration');
expect(credential.vendor).toBe('CustomOauth2');
expect(credential.scopes).toEqual(['read', 'write']);
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -82,7 +82,7 @@ describe('add memory command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const memory = projectSpec.memories.find((m: { name: string }) => m.name === memoryName);
expect(memory, 'Memory should be in project memories').toBeTruthy();
expect(memory.type).toBe('AgentCoreMemory');
expect(memory).toBeTruthy();
});

it('creates memory with multiple strategies', async () => {
Expand Down
8 changes: 1 addition & 7 deletions src/cli/commands/dev/command.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -183,11 +183,6 @@ export const registerDev = (program: Command) => {
if (protocol === 'A2A') invokePort = 9000;
else if (protocol === 'MCP') invokePort = 8000;

// Show model info if available (not applicable to MCP)
if (protocol !== 'MCP' && targetAgent?.modelProvider) {
console.log(`Provider: ${targetAgent.modelProvider}`);
}

// Protocol-aware dispatch
if (protocol === 'MCP') {
await handleMcpInvoke(invokePort, opts.invoke, opts.tool, opts.input, headers);
Expand DownExpand Up@@ -270,8 +265,7 @@ export const registerDev = (program: Command) => {
}

// Get provider info from agent config
const targetAgent = project.agents.find(a => a.name === config.agentName);
const providerInfo = targetAgent?.modelProvider ?? '(see agent code)';
const providerInfo = '(see agent code)';

console.log(`Starting dev server...`);
console.log(`Agent: ${config.agentName}`);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,6 @@
"version": 1,
"agents": [
{
"type": "AgentCoreRuntime",
"name": "existing_agent",
"build": "CodeZip",
"entrypoint": "main.py",
Expand All@@ -18,7 +17,6 @@
],
"memories": [
{
"type": "AgentCoreMemory",
"name": "existing_agent_memory",
"eventExpiryDuration": 30,
"strategies": [
Expand All@@ -30,7 +28,7 @@
],
"credentials": [
{
"type": "ApiKeyCredentialProvider",
"authorizerType": "ApiKeyCredentialProvider",
"name": "my_api_key"
}
],
Expand Down
4 changes: 1 addition & 3 deletions src/cli/commands/import/__tests__/idempotency.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -176,7 +176,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
name: 'TestProject',
version: 1,
agents: agents.map(a => ({
type: 'AgentCoreRuntime',
name: a.name,
build: 'CodeZip',
entrypoint: 'main.py',
Expand All@@ -187,7 +186,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
instrumentation: { enableOtel: true },
})),
memories: memories.map(m => ({
type: 'AgentCoreMemory',
name: m.name,
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand DownExpand Up@@ -529,7 +527,7 @@ describe('Import Idempotency (Test Group 7)', () => {
);

const existingSpec = makeProjectSpec();
(existingSpec as any).credentials = [{ type: 'ApiKeyCredentialProvider', name: 'my-cred' }];
(existingSpec as any).credentials = [{ authorizerType: 'ApiKeyCredentialProvider', name: 'my-cred' }];
mockConfigIOInstance.readProjectSpec.mockResolvedValue(existingSpec);

const progressMessages: string[] = [];
Expand Down
4 changes: 0 additions & 4 deletions src/cli/commands/import/__tests__/import-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,7 +37,6 @@ function toMemorySpec(mem: ParsedStarterToolkitMemory): Memory {
}

return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
Expand DownExpand Up@@ -367,7 +366,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('test_memory');
expect(result.eventExpiryDuration).toBe(30);
expect(result.strategies).toHaveLength(3);
Expand All@@ -384,7 +382,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('stm_memory');
expect(result.eventExpiryDuration).toBe(14);
expect(result.strategies).toHaveLength(0);
Expand DownExpand Up@@ -505,7 +502,6 @@ describe('Memory Merge Logic', () => {
it('skips existing memories by name', () => {
const existingMemories: Memory[] = [
{
type: 'AgentCoreMemory',
name: 'existing_memory',
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -557,7 +557,6 @@ agents:
const writtenSpec = mockWriteProjectSpec.mock.calls[0]![0];
expect(writtenSpec.memories).toHaveLength(1);
expect(writtenSpec.memories[0].name).toBe('test_agent_memory');
expect(writtenSpec.memories[0].type).toBe('AgentCoreMemory');
});

it('does NOT call CDK build/synth operations', async () => {
Expand Down
6 changes: 2 additions & 4 deletions src/cli/commands/import/__tests__/merge-logic.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,6 @@ function toAgentEnvSpec(agent: ParsedStarterToolkitConfig['agents'][0]): AgentEn
const codeLocation = path.join(APP_DIR, agent.name);
const entrypoint = path.basename(agent.entrypoint);
const spec: AgentEnvSpec = {
type: 'AgentCoreRuntime',
name: agent.name,
build: agent.build,
entrypoint: entrypoint as AgentEnvSpec['entrypoint'],
Expand All@@ -39,15 +38,14 @@ function toMemorySpec(mem: ParsedStarterToolkitConfig['memories'][0]): Memory {
strategies.push({ type: 'USER_PREFERENCE' });
}
return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
};
}

function toCredentialSpec(cred: ParsedStarterToolkitConfig['credentials'][0]): Credential {
return { type: 'ApiKeyCredentialProvider', name: cred.name };
return { authorizerType: 'ApiKeyCredentialProvider', name: cred.name };
}

function simulateMerge(
Expand DownExpand Up@@ -159,7 +157,7 @@ describe('merge: credential deduplication', () => {
});
it('skips credential with same name', () => {
const projectSpec = loadCliProjectSpec();
projectSpec.credentials.push({ type: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
projectSpec.credentials.push({ authorizerType: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
const parsed = parseStarterToolkitYaml(DIFFERENT_AGENT_YAML);
const { messages } = simulateMerge(projectSpec, parsed);
expect(messages).toContain('Skipping credential "new_api_key_cred" (already exists in project)');
Expand Down
Loading
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integ-tests/add-agent-auth.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -116,7 +116,7 @@ describe('integration: add BYO agent with CUSTOM_JWT auth', () => {
// Verify OAuth credential was auto-created
const oauthCred = config.credentials.find(c => c.name === `${agent2}-oauth`);
expect(oauthCred, 'OAuth credential should be auto-created').toBeTruthy();
expect(oauthCred!.type).toBe('OAuthCredentialProvider');
expect(oauthCred!.authorizerType).toBe('OAuthCredentialProvider');
expect((oauthCred as { managed?: boolean }).managed).toBe(true);

// Verify .env.local has client secrets (namespaced per credential)
Expand Down
88 changes: 53 additions & 35 deletions schemas/agentcore.schema.v1.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,10 +41,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreRuntime"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -134,10 +130,6 @@
},
"additionalProperties": false
},
"modelProvider": {
"type": "string",
"enum": ["Bedrock", "Gemini", "OpenAI", "Anthropic"]
},
"protocol": {
"type": "string",
"enum": ["HTTP", "MCP", "A2A"]
Expand DownExpand Up@@ -277,7 +269,7 @@
"additionalProperties": false
}
},
"required": ["type", "name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"required": ["name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"additionalProperties": false
}
},
Expand All@@ -287,10 +279,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreMemory"
},
"name": {
"type": "string",
"minLength": 1,
Expand All@@ -310,7 +298,7 @@
"properties": {
"type": {
"type": "string",
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC"]
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC", "CUSTOM"]
},
"name": {
"type": "string",
Expand All@@ -332,6 +320,44 @@
"items": {
"type": "string"
}
},
"semanticOverride": {
"type": "object",
"properties": {
"extraction": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
},
"consolidation": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": ["type"],
Expand All@@ -353,7 +379,7 @@
}
}
},
"required": ["type", "name", "eventExpiryDuration"],
"required": ["name", "eventExpiryDuration"],
"additionalProperties": false
}
},
Expand All@@ -365,32 +391,32 @@
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "ApiKeyCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "OAuthCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
},
"discoveryUrl": {
"type": "string",
Expand All@@ -414,7 +440,7 @@
"enum": ["inbound", "outbound"]
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
}
]
Expand All@@ -426,10 +452,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "CustomEvaluator"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -527,7 +549,7 @@
}
}
},
"required": ["type", "name", "level", "config"],
"required": ["name", "level", "config"],
"additionalProperties": false
}
},
Expand All@@ -537,10 +559,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "OnlineEvaluationConfig"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -586,7 +604,7 @@
}
}
},
"required": ["type", "name", "agent", "evaluators", "samplingRate"],
"required": ["name", "agent", "evaluators", "samplingRate"],
"additionalProperties": false
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-gateway.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -190,7 +190,7 @@ describe('add gateway command', () => {
// Verify managed OAuth credential in agentcore.json
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === `${gatewayName}-oauth`);
expect(credential, 'Managed OAuth credential should exist').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.managed).toBe(true);
expect(credential.usage).toBe('inbound');
});
Expand Down
4 changes: 2 additions & 2 deletions src/cli/commands/add/__tests__/add-identity.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -61,7 +61,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('ApiKeyCredentialProvider');
expect(credential.authorizerType).toBe('ApiKeyCredentialProvider');
});
});

Expand DownExpand Up@@ -98,7 +98,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.discoveryUrl).toBe('https://idp.example.com/.well-known/openid-configuration');
expect(credential.vendor).toBe('CustomOauth2');
expect(credential.scopes).toEqual(['read', 'write']);
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -82,7 +82,7 @@ describe('add memory command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const memory = projectSpec.memories.find((m: { name: string }) => m.name === memoryName);
expect(memory, 'Memory should be in project memories').toBeTruthy();
expect(memory.type).toBe('AgentCoreMemory');
expect(memory).toBeTruthy();
});

it('creates memory with multiple strategies', async () => {
Expand Down
8 changes: 1 addition & 7 deletions src/cli/commands/dev/command.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -183,11 +183,6 @@ export const registerDev = (program: Command) => {
if (protocol === 'A2A') invokePort = 9000;
else if (protocol === 'MCP') invokePort = 8000;

// Show model info if available (not applicable to MCP)
if (protocol !== 'MCP' && targetAgent?.modelProvider) {
console.log(`Provider: ${targetAgent.modelProvider}`);
}

// Protocol-aware dispatch
if (protocol === 'MCP') {
await handleMcpInvoke(invokePort, opts.invoke, opts.tool, opts.input, headers);
Expand DownExpand Up@@ -270,8 +265,7 @@ export const registerDev = (program: Command) => {
}

// Get provider info from agent config
const targetAgent = project.agents.find(a => a.name === config.agentName);
const providerInfo = targetAgent?.modelProvider ?? '(see agent code)';
const providerInfo = '(see agent code)';

console.log(`Starting dev server...`);
console.log(`Agent: ${config.agentName}`);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,6 @@
"version": 1,
"agents": [
{
"type": "AgentCoreRuntime",
"name": "existing_agent",
"build": "CodeZip",
"entrypoint": "main.py",
Expand All@@ -18,7 +17,6 @@
],
"memories": [
{
"type": "AgentCoreMemory",
"name": "existing_agent_memory",
"eventExpiryDuration": 30,
"strategies": [
Expand All@@ -30,7 +28,7 @@
],
"credentials": [
{
"type": "ApiKeyCredentialProvider",
"authorizerType": "ApiKeyCredentialProvider",
"name": "my_api_key"
}
],
Expand Down
4 changes: 1 addition & 3 deletions src/cli/commands/import/__tests__/idempotency.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -176,7 +176,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
name: 'TestProject',
version: 1,
agents: agents.map(a => ({
type: 'AgentCoreRuntime',
name: a.name,
build: 'CodeZip',
entrypoint: 'main.py',
Expand All@@ -187,7 +186,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
instrumentation: { enableOtel: true },
})),
memories: memories.map(m => ({
type: 'AgentCoreMemory',
name: m.name,
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand DownExpand Up@@ -529,7 +527,7 @@ describe('Import Idempotency (Test Group 7)', () => {
);

const existingSpec = makeProjectSpec();
(existingSpec as any).credentials = [{ type: 'ApiKeyCredentialProvider', name: 'my-cred' }];
(existingSpec as any).credentials = [{ authorizerType: 'ApiKeyCredentialProvider', name: 'my-cred' }];
mockConfigIOInstance.readProjectSpec.mockResolvedValue(existingSpec);

const progressMessages: string[] = [];
Expand Down
4 changes: 0 additions & 4 deletions src/cli/commands/import/__tests__/import-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,7 +37,6 @@ function toMemorySpec(mem: ParsedStarterToolkitMemory): Memory {
}

return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
Expand DownExpand Up@@ -367,7 +366,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('test_memory');
expect(result.eventExpiryDuration).toBe(30);
expect(result.strategies).toHaveLength(3);
Expand All@@ -384,7 +382,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('stm_memory');
expect(result.eventExpiryDuration).toBe(14);
expect(result.strategies).toHaveLength(0);
Expand DownExpand Up@@ -505,7 +502,6 @@ describe('Memory Merge Logic', () => {
it('skips existing memories by name', () => {
const existingMemories: Memory[] = [
{
type: 'AgentCoreMemory',
name: 'existing_memory',
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -557,7 +557,6 @@ agents:
const writtenSpec = mockWriteProjectSpec.mock.calls[0]![0];
expect(writtenSpec.memories).toHaveLength(1);
expect(writtenSpec.memories[0].name).toBe('test_agent_memory');
expect(writtenSpec.memories[0].type).toBe('AgentCoreMemory');
});

it('does NOT call CDK build/synth operations', async () => {
Expand Down
6 changes: 2 additions & 4 deletions src/cli/commands/import/__tests__/merge-logic.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,6 @@ function toAgentEnvSpec(agent: ParsedStarterToolkitConfig['agents'][0]): AgentEn
const codeLocation = path.join(APP_DIR, agent.name);
const entrypoint = path.basename(agent.entrypoint);
const spec: AgentEnvSpec = {
type: 'AgentCoreRuntime',
name: agent.name,
build: agent.build,
entrypoint: entrypoint as AgentEnvSpec['entrypoint'],
Expand All@@ -39,15 +38,14 @@ function toMemorySpec(mem: ParsedStarterToolkitConfig['memories'][0]): Memory {
strategies.push({ type: 'USER_PREFERENCE' });
}
return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
};
}

function toCredentialSpec(cred: ParsedStarterToolkitConfig['credentials'][0]): Credential {
return { type: 'ApiKeyCredentialProvider', name: cred.name };
return { authorizerType: 'ApiKeyCredentialProvider', name: cred.name };
}

function simulateMerge(
Expand DownExpand Up@@ -159,7 +157,7 @@ describe('merge: credential deduplication', () => {
});
it('skips credential with same name', () => {
const projectSpec = loadCliProjectSpec();
projectSpec.credentials.push({ type: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
projectSpec.credentials.push({ authorizerType: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
const parsed = parseStarterToolkitYaml(DIFFERENT_AGENT_YAML);
const { messages } = simulateMerge(projectSpec, parsed);
expect(messages).toContain('Skipping credential "new_api_key_cred" (already exists in project)');
Expand Down
Loading
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integ-tests/add-agent-auth.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -116,7 +116,7 @@ describe('integration: add BYO agent with CUSTOM_JWT auth', () => {
// Verify OAuth credential was auto-created
const oauthCred = config.credentials.find(c => c.name === `${agent2}-oauth`);
expect(oauthCred, 'OAuth credential should be auto-created').toBeTruthy();
expect(oauthCred!.type).toBe('OAuthCredentialProvider');
expect(oauthCred!.authorizerType).toBe('OAuthCredentialProvider');
expect((oauthCred as { managed?: boolean }).managed).toBe(true);

// Verify .env.local has client secrets (namespaced per credential)
Expand Down
88 changes: 53 additions & 35 deletions schemas/agentcore.schema.v1.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,10 +41,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreRuntime"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -134,10 +130,6 @@
},
"additionalProperties": false
},
"modelProvider": {
"type": "string",
"enum": ["Bedrock", "Gemini", "OpenAI", "Anthropic"]
},
"protocol": {
"type": "string",
"enum": ["HTTP", "MCP", "A2A"]
Expand DownExpand Up@@ -277,7 +269,7 @@
"additionalProperties": false
}
},
"required": ["type", "name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"required": ["name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"additionalProperties": false
}
},
Expand All@@ -287,10 +279,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreMemory"
},
"name": {
"type": "string",
"minLength": 1,
Expand All@@ -310,7 +298,7 @@
"properties": {
"type": {
"type": "string",
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC"]
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC", "CUSTOM"]
},
"name": {
"type": "string",
Expand All@@ -332,6 +320,44 @@
"items": {
"type": "string"
}
},
"semanticOverride": {
"type": "object",
"properties": {
"extraction": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
},
"consolidation": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": ["type"],
Expand All@@ -353,7 +379,7 @@
}
}
},
"required": ["type", "name", "eventExpiryDuration"],
"required": ["name", "eventExpiryDuration"],
"additionalProperties": false
}
},
Expand All@@ -365,32 +391,32 @@
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "ApiKeyCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "OAuthCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
},
"discoveryUrl": {
"type": "string",
Expand All@@ -414,7 +440,7 @@
"enum": ["inbound", "outbound"]
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
}
]
Expand All@@ -426,10 +452,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "CustomEvaluator"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -527,7 +549,7 @@
}
}
},
"required": ["type", "name", "level", "config"],
"required": ["name", "level", "config"],
"additionalProperties": false
}
},
Expand All@@ -537,10 +559,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "OnlineEvaluationConfig"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -586,7 +604,7 @@
}
}
},
"required": ["type", "name", "agent", "evaluators", "samplingRate"],
"required": ["name", "agent", "evaluators", "samplingRate"],
"additionalProperties": false
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-gateway.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -190,7 +190,7 @@ describe('add gateway command', () => {
// Verify managed OAuth credential in agentcore.json
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === `${gatewayName}-oauth`);
expect(credential, 'Managed OAuth credential should exist').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.managed).toBe(true);
expect(credential.usage).toBe('inbound');
});
Expand Down
4 changes: 2 additions & 2 deletions src/cli/commands/add/__tests__/add-identity.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -61,7 +61,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('ApiKeyCredentialProvider');
expect(credential.authorizerType).toBe('ApiKeyCredentialProvider');
});
});

Expand DownExpand Up@@ -98,7 +98,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.discoveryUrl).toBe('https://idp.example.com/.well-known/openid-configuration');
expect(credential.vendor).toBe('CustomOauth2');
expect(credential.scopes).toEqual(['read', 'write']);
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -82,7 +82,7 @@ describe('add memory command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const memory = projectSpec.memories.find((m: { name: string }) => m.name === memoryName);
expect(memory, 'Memory should be in project memories').toBeTruthy();
expect(memory.type).toBe('AgentCoreMemory');
expect(memory).toBeTruthy();
});

it('creates memory with multiple strategies', async () => {
Expand Down
8 changes: 1 addition & 7 deletions src/cli/commands/dev/command.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -183,11 +183,6 @@ export const registerDev = (program: Command) => {
if (protocol === 'A2A') invokePort = 9000;
else if (protocol === 'MCP') invokePort = 8000;

// Show model info if available (not applicable to MCP)
if (protocol !== 'MCP' && targetAgent?.modelProvider) {
console.log(`Provider: ${targetAgent.modelProvider}`);
}

// Protocol-aware dispatch
if (protocol === 'MCP') {
await handleMcpInvoke(invokePort, opts.invoke, opts.tool, opts.input, headers);
Expand DownExpand Up@@ -270,8 +265,7 @@ export const registerDev = (program: Command) => {
}

// Get provider info from agent config
const targetAgent = project.agents.find(a => a.name === config.agentName);
const providerInfo = targetAgent?.modelProvider ?? '(see agent code)';
const providerInfo = '(see agent code)';

console.log(`Starting dev server...`);
console.log(`Agent: ${config.agentName}`);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,6 @@
"version": 1,
"agents": [
{
"type": "AgentCoreRuntime",
"name": "existing_agent",
"build": "CodeZip",
"entrypoint": "main.py",
Expand All@@ -18,7 +17,6 @@
],
"memories": [
{
"type": "AgentCoreMemory",
"name": "existing_agent_memory",
"eventExpiryDuration": 30,
"strategies": [
Expand All@@ -30,7 +28,7 @@
],
"credentials": [
{
"type": "ApiKeyCredentialProvider",
"authorizerType": "ApiKeyCredentialProvider",
"name": "my_api_key"
}
],
Expand Down
4 changes: 1 addition & 3 deletions src/cli/commands/import/__tests__/idempotency.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -176,7 +176,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
name: 'TestProject',
version: 1,
agents: agents.map(a => ({
type: 'AgentCoreRuntime',
name: a.name,
build: 'CodeZip',
entrypoint: 'main.py',
Expand All@@ -187,7 +186,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
instrumentation: { enableOtel: true },
})),
memories: memories.map(m => ({
type: 'AgentCoreMemory',
name: m.name,
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand DownExpand Up@@ -529,7 +527,7 @@ describe('Import Idempotency (Test Group 7)', () => {
);

const existingSpec = makeProjectSpec();
(existingSpec as any).credentials = [{ type: 'ApiKeyCredentialProvider', name: 'my-cred' }];
(existingSpec as any).credentials = [{ authorizerType: 'ApiKeyCredentialProvider', name: 'my-cred' }];
mockConfigIOInstance.readProjectSpec.mockResolvedValue(existingSpec);

const progressMessages: string[] = [];
Expand Down
4 changes: 0 additions & 4 deletions src/cli/commands/import/__tests__/import-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,7 +37,6 @@ function toMemorySpec(mem: ParsedStarterToolkitMemory): Memory {
}

return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
Expand DownExpand Up@@ -367,7 +366,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('test_memory');
expect(result.eventExpiryDuration).toBe(30);
expect(result.strategies).toHaveLength(3);
Expand All@@ -384,7 +382,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('stm_memory');
expect(result.eventExpiryDuration).toBe(14);
expect(result.strategies).toHaveLength(0);
Expand DownExpand Up@@ -505,7 +502,6 @@ describe('Memory Merge Logic', () => {
it('skips existing memories by name', () => {
const existingMemories: Memory[] = [
{
type: 'AgentCoreMemory',
name: 'existing_memory',
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -557,7 +557,6 @@ agents:
const writtenSpec = mockWriteProjectSpec.mock.calls[0]![0];
expect(writtenSpec.memories).toHaveLength(1);
expect(writtenSpec.memories[0].name).toBe('test_agent_memory');
expect(writtenSpec.memories[0].type).toBe('AgentCoreMemory');
});

it('does NOT call CDK build/synth operations', async () => {
Expand Down
6 changes: 2 additions & 4 deletions src/cli/commands/import/__tests__/merge-logic.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,6 @@ function toAgentEnvSpec(agent: ParsedStarterToolkitConfig['agents'][0]): AgentEn
const codeLocation = path.join(APP_DIR, agent.name);
const entrypoint = path.basename(agent.entrypoint);
const spec: AgentEnvSpec = {
type: 'AgentCoreRuntime',
name: agent.name,
build: agent.build,
entrypoint: entrypoint as AgentEnvSpec['entrypoint'],
Expand All@@ -39,15 +38,14 @@ function toMemorySpec(mem: ParsedStarterToolkitConfig['memories'][0]): Memory {
strategies.push({ type: 'USER_PREFERENCE' });
}
return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
};
}

function toCredentialSpec(cred: ParsedStarterToolkitConfig['credentials'][0]): Credential {
return { type: 'ApiKeyCredentialProvider', name: cred.name };
return { authorizerType: 'ApiKeyCredentialProvider', name: cred.name };
}

function simulateMerge(
Expand DownExpand Up@@ -159,7 +157,7 @@ describe('merge: credential deduplication', () => {
});
it('skips credential with same name', () => {
const projectSpec = loadCliProjectSpec();
projectSpec.credentials.push({ type: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
projectSpec.credentials.push({ authorizerType: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
const parsed = parseStarterToolkitYaml(DIFFERENT_AGENT_YAML);
const { messages } = simulateMerge(projectSpec, parsed);
expect(messages).toContain('Skipping credential "new_api_key_cred" (already exists in project)');
Expand Down
Loading
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integ-tests/add-agent-auth.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -116,7 +116,7 @@ describe('integration: add BYO agent with CUSTOM_JWT auth', () => {
// Verify OAuth credential was auto-created
const oauthCred = config.credentials.find(c => c.name === `${agent2}-oauth`);
expect(oauthCred, 'OAuth credential should be auto-created').toBeTruthy();
expect(oauthCred!.type).toBe('OAuthCredentialProvider');
expect(oauthCred!.authorizerType).toBe('OAuthCredentialProvider');
expect((oauthCred as { managed?: boolean }).managed).toBe(true);

// Verify .env.local has client secrets (namespaced per credential)
Expand Down
88 changes: 53 additions & 35 deletions schemas/agentcore.schema.v1.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,10 +41,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreRuntime"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -134,10 +130,6 @@
},
"additionalProperties": false
},
"modelProvider": {
"type": "string",
"enum": ["Bedrock", "Gemini", "OpenAI", "Anthropic"]
},
"protocol": {
"type": "string",
"enum": ["HTTP", "MCP", "A2A"]
Expand DownExpand Up@@ -277,7 +269,7 @@
"additionalProperties": false
}
},
"required": ["type", "name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"required": ["name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"additionalProperties": false
}
},
Expand All@@ -287,10 +279,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreMemory"
},
"name": {
"type": "string",
"minLength": 1,
Expand All@@ -310,7 +298,7 @@
"properties": {
"type": {
"type": "string",
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC"]
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC", "CUSTOM"]
},
"name": {
"type": "string",
Expand All@@ -332,6 +320,44 @@
"items": {
"type": "string"
}
},
"semanticOverride": {
"type": "object",
"properties": {
"extraction": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
},
"consolidation": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": ["type"],
Expand All@@ -353,7 +379,7 @@
}
}
},
"required": ["type", "name", "eventExpiryDuration"],
"required": ["name", "eventExpiryDuration"],
"additionalProperties": false
}
},
Expand All@@ -365,32 +391,32 @@
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "ApiKeyCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "OAuthCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
},
"discoveryUrl": {
"type": "string",
Expand All@@ -414,7 +440,7 @@
"enum": ["inbound", "outbound"]
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
}
]
Expand All@@ -426,10 +452,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "CustomEvaluator"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -527,7 +549,7 @@
}
}
},
"required": ["type", "name", "level", "config"],
"required": ["name", "level", "config"],
"additionalProperties": false
}
},
Expand All@@ -537,10 +559,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "OnlineEvaluationConfig"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -586,7 +604,7 @@
}
}
},
"required": ["type", "name", "agent", "evaluators", "samplingRate"],
"required": ["name", "agent", "evaluators", "samplingRate"],
"additionalProperties": false
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-gateway.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -190,7 +190,7 @@ describe('add gateway command', () => {
// Verify managed OAuth credential in agentcore.json
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === `${gatewayName}-oauth`);
expect(credential, 'Managed OAuth credential should exist').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.managed).toBe(true);
expect(credential.usage).toBe('inbound');
});
Expand Down
4 changes: 2 additions & 2 deletions src/cli/commands/add/__tests__/add-identity.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -61,7 +61,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('ApiKeyCredentialProvider');
expect(credential.authorizerType).toBe('ApiKeyCredentialProvider');
});
});

Expand DownExpand Up@@ -98,7 +98,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.discoveryUrl).toBe('https://idp.example.com/.well-known/openid-configuration');
expect(credential.vendor).toBe('CustomOauth2');
expect(credential.scopes).toEqual(['read', 'write']);
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -82,7 +82,7 @@ describe('add memory command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const memory = projectSpec.memories.find((m: { name: string }) => m.name === memoryName);
expect(memory, 'Memory should be in project memories').toBeTruthy();
expect(memory.type).toBe('AgentCoreMemory');
expect(memory).toBeTruthy();
});

it('creates memory with multiple strategies', async () => {
Expand Down
8 changes: 1 addition & 7 deletions src/cli/commands/dev/command.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -183,11 +183,6 @@ export const registerDev = (program: Command) => {
if (protocol === 'A2A') invokePort = 9000;
else if (protocol === 'MCP') invokePort = 8000;

// Show model info if available (not applicable to MCP)
if (protocol !== 'MCP' && targetAgent?.modelProvider) {
console.log(`Provider: ${targetAgent.modelProvider}`);
}

// Protocol-aware dispatch
if (protocol === 'MCP') {
await handleMcpInvoke(invokePort, opts.invoke, opts.tool, opts.input, headers);
Expand DownExpand Up@@ -270,8 +265,7 @@ export const registerDev = (program: Command) => {
}

// Get provider info from agent config
const targetAgent = project.agents.find(a => a.name === config.agentName);
const providerInfo = targetAgent?.modelProvider ?? '(see agent code)';
const providerInfo = '(see agent code)';

console.log(`Starting dev server...`);
console.log(`Agent: ${config.agentName}`);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,6 @@
"version": 1,
"agents": [
{
"type": "AgentCoreRuntime",
"name": "existing_agent",
"build": "CodeZip",
"entrypoint": "main.py",
Expand All@@ -18,7 +17,6 @@
],
"memories": [
{
"type": "AgentCoreMemory",
"name": "existing_agent_memory",
"eventExpiryDuration": 30,
"strategies": [
Expand All@@ -30,7 +28,7 @@
],
"credentials": [
{
"type": "ApiKeyCredentialProvider",
"authorizerType": "ApiKeyCredentialProvider",
"name": "my_api_key"
}
],
Expand Down
4 changes: 1 addition & 3 deletions src/cli/commands/import/__tests__/idempotency.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -176,7 +176,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
name: 'TestProject',
version: 1,
agents: agents.map(a => ({
type: 'AgentCoreRuntime',
name: a.name,
build: 'CodeZip',
entrypoint: 'main.py',
Expand All@@ -187,7 +186,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
instrumentation: { enableOtel: true },
})),
memories: memories.map(m => ({
type: 'AgentCoreMemory',
name: m.name,
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand DownExpand Up@@ -529,7 +527,7 @@ describe('Import Idempotency (Test Group 7)', () => {
);

const existingSpec = makeProjectSpec();
(existingSpec as any).credentials = [{ type: 'ApiKeyCredentialProvider', name: 'my-cred' }];
(existingSpec as any).credentials = [{ authorizerType: 'ApiKeyCredentialProvider', name: 'my-cred' }];
mockConfigIOInstance.readProjectSpec.mockResolvedValue(existingSpec);

const progressMessages: string[] = [];
Expand Down
4 changes: 0 additions & 4 deletions src/cli/commands/import/__tests__/import-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,7 +37,6 @@ function toMemorySpec(mem: ParsedStarterToolkitMemory): Memory {
}

return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
Expand DownExpand Up@@ -367,7 +366,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('test_memory');
expect(result.eventExpiryDuration).toBe(30);
expect(result.strategies).toHaveLength(3);
Expand All@@ -384,7 +382,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('stm_memory');
expect(result.eventExpiryDuration).toBe(14);
expect(result.strategies).toHaveLength(0);
Expand DownExpand Up@@ -505,7 +502,6 @@ describe('Memory Merge Logic', () => {
it('skips existing memories by name', () => {
const existingMemories: Memory[] = [
{
type: 'AgentCoreMemory',
name: 'existing_memory',
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -557,7 +557,6 @@ agents:
const writtenSpec = mockWriteProjectSpec.mock.calls[0]![0];
expect(writtenSpec.memories).toHaveLength(1);
expect(writtenSpec.memories[0].name).toBe('test_agent_memory');
expect(writtenSpec.memories[0].type).toBe('AgentCoreMemory');
});

it('does NOT call CDK build/synth operations', async () => {
Expand Down
6 changes: 2 additions & 4 deletions src/cli/commands/import/__tests__/merge-logic.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,6 @@ function toAgentEnvSpec(agent: ParsedStarterToolkitConfig['agents'][0]): AgentEn
const codeLocation = path.join(APP_DIR, agent.name);
const entrypoint = path.basename(agent.entrypoint);
const spec: AgentEnvSpec = {
type: 'AgentCoreRuntime',
name: agent.name,
build: agent.build,
entrypoint: entrypoint as AgentEnvSpec['entrypoint'],
Expand All@@ -39,15 +38,14 @@ function toMemorySpec(mem: ParsedStarterToolkitConfig['memories'][0]): Memory {
strategies.push({ type: 'USER_PREFERENCE' });
}
return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
};
}

function toCredentialSpec(cred: ParsedStarterToolkitConfig['credentials'][0]): Credential {
return { type: 'ApiKeyCredentialProvider', name: cred.name };
return { authorizerType: 'ApiKeyCredentialProvider', name: cred.name };
}

function simulateMerge(
Expand DownExpand Up@@ -159,7 +157,7 @@ describe('merge: credential deduplication', () => {
});
it('skips credential with same name', () => {
const projectSpec = loadCliProjectSpec();
projectSpec.credentials.push({ type: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
projectSpec.credentials.push({ authorizerType: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
const parsed = parseStarterToolkitYaml(DIFFERENT_AGENT_YAML);
const { messages } = simulateMerge(projectSpec, parsed);
expect(messages).toContain('Skipping credential "new_api_key_cred" (already exists in project)');
Expand Down
Loading
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integ-tests/add-agent-auth.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -116,7 +116,7 @@ describe('integration: add BYO agent with CUSTOM_JWT auth', () => {
// Verify OAuth credential was auto-created
const oauthCred = config.credentials.find(c => c.name === `${agent2}-oauth`);
expect(oauthCred, 'OAuth credential should be auto-created').toBeTruthy();
expect(oauthCred!.type).toBe('OAuthCredentialProvider');
expect(oauthCred!.authorizerType).toBe('OAuthCredentialProvider');
expect((oauthCred as { managed?: boolean }).managed).toBe(true);

// Verify .env.local has client secrets (namespaced per credential)
Expand Down
88 changes: 53 additions & 35 deletions schemas/agentcore.schema.v1.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,10 +41,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreRuntime"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -134,10 +130,6 @@
},
"additionalProperties": false
},
"modelProvider": {
"type": "string",
"enum": ["Bedrock", "Gemini", "OpenAI", "Anthropic"]
},
"protocol": {
"type": "string",
"enum": ["HTTP", "MCP", "A2A"]
Expand DownExpand Up@@ -277,7 +269,7 @@
"additionalProperties": false
}
},
"required": ["type", "name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"required": ["name", "build", "entrypoint", "codeLocation", "runtimeVersion"],
"additionalProperties": false
}
},
Expand All@@ -287,10 +279,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AgentCoreMemory"
},
"name": {
"type": "string",
"minLength": 1,
Expand All@@ -310,7 +298,7 @@
"properties": {
"type": {
"type": "string",
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC"]
"enum": ["SEMANTIC", "SUMMARIZATION", "USER_PREFERENCE", "EPISODIC", "CUSTOM"]
},
"name": {
"type": "string",
Expand All@@ -332,6 +320,44 @@
"items": {
"type": "string"
}
},
"semanticOverride": {
"type": "object",
"properties": {
"extraction": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
},
"consolidation": {
"type": "object",
"properties": {
"appendToPrompt": {
"type": "string",
"minLength": 1,
"maxLength": 30000
},
"modelId": {
"type": "string",
"minLength": 1
}
},
"required": ["appendToPrompt", "modelId"],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": ["type"],
Expand All@@ -353,7 +379,7 @@
}
}
},
"required": ["type", "name", "eventExpiryDuration"],
"required": ["name", "eventExpiryDuration"],
"additionalProperties": false
}
},
Expand All@@ -365,32 +391,32 @@
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "ApiKeyCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
Comment thread
jesseturner21 marked this conversation as resolved.
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"authorizerType": {
"type": "string",
"const": "OAuthCredentialProvider"
},
"name": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"pattern": "^[A-Za-z0-9_.-]+$"
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9\\-_]+$"
},
"discoveryUrl": {
"type": "string",
Expand All@@ -414,7 +440,7 @@
"enum": ["inbound", "outbound"]
}
},
"required": ["type", "name"],
"required": ["authorizerType", "name"],
"additionalProperties": false
}
]
Expand All@@ -426,10 +452,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "CustomEvaluator"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -527,7 +549,7 @@
}
}
},
"required": ["type", "name", "level", "config"],
"required": ["name", "level", "config"],
"additionalProperties": false
}
},
Expand All@@ -537,10 +559,6 @@
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "OnlineEvaluationConfig"
},
"name": {
"type": "string",
"minLength": 1,
Expand DownExpand Up@@ -586,7 +604,7 @@
}
}
},
"required": ["type", "name", "agent", "evaluators", "samplingRate"],
"required": ["name", "agent", "evaluators", "samplingRate"],
"additionalProperties": false
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-gateway.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -190,7 +190,7 @@ describe('add gateway command', () => {
// Verify managed OAuth credential in agentcore.json
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === `${gatewayName}-oauth`);
expect(credential, 'Managed OAuth credential should exist').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.managed).toBe(true);
expect(credential.usage).toBe('inbound');
});
Expand Down
4 changes: 2 additions & 2 deletions src/cli/commands/add/__tests__/add-identity.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -61,7 +61,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('ApiKeyCredentialProvider');
expect(credential.authorizerType).toBe('ApiKeyCredentialProvider');
});
});

Expand DownExpand Up@@ -98,7 +98,7 @@ describe('add credential command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const credential = projectSpec.credentials.find((c: { name: string }) => c.name === identityName);
expect(credential, 'Credential should be in project credentials').toBeTruthy();
expect(credential.type).toBe('OAuthCredentialProvider');
expect(credential.authorizerType).toBe('OAuthCredentialProvider');
expect(credential.discoveryUrl).toBe('https://idp.example.com/.well-known/openid-configuration');
expect(credential.vendor).toBe('CustomOauth2');
expect(credential.scopes).toEqual(['read', 'write']);
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add/__tests__/add-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -82,7 +82,7 @@ describe('add memory command', () => {
const projectSpec = JSON.parse(await readFile(join(projectDir, 'agentcore/agentcore.json'), 'utf-8'));
const memory = projectSpec.memories.find((m: { name: string }) => m.name === memoryName);
expect(memory, 'Memory should be in project memories').toBeTruthy();
expect(memory.type).toBe('AgentCoreMemory');
expect(memory).toBeTruthy();
});

it('creates memory with multiple strategies', async () => {
Expand Down
8 changes: 1 addition & 7 deletions src/cli/commands/dev/command.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -183,11 +183,6 @@ export const registerDev = (program: Command) => {
if (protocol === 'A2A') invokePort = 9000;
else if (protocol === 'MCP') invokePort = 8000;

// Show model info if available (not applicable to MCP)
if (protocol !== 'MCP' && targetAgent?.modelProvider) {
console.log(`Provider: ${targetAgent.modelProvider}`);
}

// Protocol-aware dispatch
if (protocol === 'MCP') {
await handleMcpInvoke(invokePort, opts.invoke, opts.tool, opts.input, headers);
Expand DownExpand Up@@ -270,8 +265,7 @@ export const registerDev = (program: Command) => {
}

// Get provider info from agent config
const targetAgent = project.agents.find(a => a.name === config.agentName);
const providerInfo = targetAgent?.modelProvider ?? '(see agent code)';
const providerInfo = '(see agent code)';

console.log(`Starting dev server...`);
console.log(`Agent: ${config.agentName}`);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,6 @@
"version": 1,
"agents": [
{
"type": "AgentCoreRuntime",
"name": "existing_agent",
"build": "CodeZip",
"entrypoint": "main.py",
Expand All@@ -18,7 +17,6 @@
],
"memories": [
{
"type": "AgentCoreMemory",
"name": "existing_agent_memory",
"eventExpiryDuration": 30,
"strategies": [
Expand All@@ -30,7 +28,7 @@
],
"credentials": [
{
"type": "ApiKeyCredentialProvider",
"authorizerType": "ApiKeyCredentialProvider",
"name": "my_api_key"
}
],
Expand Down
4 changes: 1 addition & 3 deletions src/cli/commands/import/__tests__/idempotency.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -176,7 +176,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
name: 'TestProject',
version: 1,
agents: agents.map(a => ({
type: 'AgentCoreRuntime',
name: a.name,
build: 'CodeZip',
entrypoint: 'main.py',
Expand All@@ -187,7 +186,6 @@ function makeProjectSpec(agents: { name: string }[] = [], memories: { name: stri
instrumentation: { enableOtel: true },
})),
memories: memories.map(m => ({
type: 'AgentCoreMemory',
name: m.name,
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand DownExpand Up@@ -529,7 +527,7 @@ describe('Import Idempotency (Test Group 7)', () => {
);

const existingSpec = makeProjectSpec();
(existingSpec as any).credentials = [{ type: 'ApiKeyCredentialProvider', name: 'my-cred' }];
(existingSpec as any).credentials = [{ authorizerType: 'ApiKeyCredentialProvider', name: 'my-cred' }];
mockConfigIOInstance.readProjectSpec.mockResolvedValue(existingSpec);

const progressMessages: string[] = [];
Expand Down
4 changes: 0 additions & 4 deletions src/cli/commands/import/__tests__/import-memory.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,7 +37,6 @@ function toMemorySpec(mem: ParsedStarterToolkitMemory): Memory {
}

return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
Expand DownExpand Up@@ -367,7 +366,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('test_memory');
expect(result.eventExpiryDuration).toBe(30);
expect(result.strategies).toHaveLength(3);
Expand All@@ -384,7 +382,6 @@ describe('toMemorySpec', () => {

const result = toMemorySpec(mem);

expect(result.type).toBe('AgentCoreMemory');
expect(result.name).toBe('stm_memory');
expect(result.eventExpiryDuration).toBe(14);
expect(result.strategies).toHaveLength(0);
Expand DownExpand Up@@ -505,7 +502,6 @@ describe('Memory Merge Logic', () => {
it('skips existing memories by name', () => {
const existingMemories: Memory[] = [
{
type: 'AgentCoreMemory',
name: 'existing_memory',
eventExpiryDuration: 30,
strategies: [{ type: 'SEMANTIC' }],
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -557,7 +557,6 @@ agents:
const writtenSpec = mockWriteProjectSpec.mock.calls[0]![0];
expect(writtenSpec.memories).toHaveLength(1);
expect(writtenSpec.memories[0].name).toBe('test_agent_memory');
expect(writtenSpec.memories[0].type).toBe('AgentCoreMemory');
});

it('does NOT call CDK build/synth operations', async () => {
Expand Down
6 changes: 2 additions & 4 deletions src/cli/commands/import/__tests__/merge-logic.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,6 @@ function toAgentEnvSpec(agent: ParsedStarterToolkitConfig['agents'][0]): AgentEn
const codeLocation = path.join(APP_DIR, agent.name);
const entrypoint = path.basename(agent.entrypoint);
const spec: AgentEnvSpec = {
type: 'AgentCoreRuntime',
name: agent.name,
build: agent.build,
entrypoint: entrypoint as AgentEnvSpec['entrypoint'],
Expand All@@ -39,15 +38,14 @@ function toMemorySpec(mem: ParsedStarterToolkitConfig['memories'][0]): Memory {
strategies.push({ type: 'USER_PREFERENCE' });
}
return {
type: 'AgentCoreMemory',
name: mem.name,
eventExpiryDuration: Math.max(7, Math.min(365, mem.eventExpiryDays)),
strategies,
};
}

function toCredentialSpec(cred: ParsedStarterToolkitConfig['credentials'][0]): Credential {
return { type: 'ApiKeyCredentialProvider', name: cred.name };
return { authorizerType: 'ApiKeyCredentialProvider', name: cred.name };
}

function simulateMerge(
Expand DownExpand Up@@ -159,7 +157,7 @@ describe('merge: credential deduplication', () => {
});
it('skips credential with same name', () => {
const projectSpec = loadCliProjectSpec();
projectSpec.credentials.push({ type: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
projectSpec.credentials.push({ authorizerType: 'ApiKeyCredentialProvider', name: 'new_api_key_cred' });
const parsed = parseStarterToolkitYaml(DIFFERENT_AGENT_YAML);
const { messages } = simulateMerge(projectSpec, parsed);
expect(messages).toContain('Skipping credential "new_api_key_cred" (already exists in project)');
Expand Down
Loading
Loading