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
66 changes: 0 additions & 66 deletions src/cli/commands/run/__tests__/run-ingest-gating.test.ts

This file was deleted.

10 changes: 1 addition & 9 deletions src/cli/commands/run/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { ConfigIO, ValidationError, findConfigRoot, serializeResult } from '../.
import type { RecommendationType } from '../../aws/agentcore-recommendation';
import { COMMAND_DESCRIPTIONS } from '../../constants';
import { getErrorMessage } from '../../errors';
import { isGatedFeaturesEnabled } from '../../feature-flags';
import { handleRunEval } from '../../operations/eval';
import type { RunEvalOptions } from '../../operations/eval';
import { runKbIngestionByName } from '../../operations/ingest';
Expand Down Expand Up @@ -659,20 +658,13 @@ export const registerRun = (program: Command) => {
// now; future ingestible types could add a --type flag.
// ──────────────────────────────────────────────────────────────────────
runCmd
.command('ingest', { hidden: !isGatedFeaturesEnabled() })
.command('ingest')
.description('Start a fresh ingestion job for every data source on a deployed knowledge base.')
.option('--name <name>', 'Knowledge base name (must exist in agentcore.json)')
.option('--target <target>', 'Deployment target name (defaults to "default")', 'default')
.option('--data-source <uri>', 'Ingest only the data source with this URI (default: all sources)')
.option('--json', 'Output as JSON [non-interactive]')
.action(async (cliOptions: { name?: string; target?: string; dataSource?: string; json?: boolean }) => {
// FMKB (knowledge bases) is gated behind ENABLE_GATED_FEATURES; ingestion
// operates exclusively on knowledge bases, so it must be gated to match
// `add knowledge-base` / `remove knowledge-base`.
if (!isGatedFeaturesEnabled()) {
console.error('Knowledge bases are not yet available.');
process.exit(1);
}
if (!findConfigRoot()) {
console.error('No agentcore project found. Run `agentcore create` first.');
process.exit(1);
Expand Down
18 changes: 5 additions & 13 deletions src/cli/tui/screens/run-eval/RunScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { isGatedFeaturesEnabled } from '../../../feature-flags';
import { Screen, WizardSelect } from '../../components';
import type { SelectableItem } from '../../components';
import { HELP_TEXT } from '../../constants';
Expand Down Expand Up @@ -46,18 +45,11 @@ export function RunScreen({
title: 'Recommendation',
description: 'Optimize system prompts or tool descriptions using agent traces.',
},
// Knowledge base ingestion is part of FMKB, which is gated behind
// ENABLE_GATED_FEATURES. Hide the option entirely when the gate is off,
// matching the hidden `agentcore run ingest` CLI command.
...(isGatedFeaturesEnabled()
? [
{
id: 'run-ingest',
title: 'Ingest knowledge base',
description: 'Start an ingestion job for a deployed knowledge base.',
},
]
: []),
{
id: 'run-ingest',
title: 'Ingest knowledge base',
description: 'Start an ingestion job for a deployed knowledge base.',
},
{
id: 'run-ab-test',
title: 'A/B Test',
Expand Down
Loading