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
7 changes: 6 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ DEEPGRAM_API_KEY=
NEXT_PUBLIC_API_URL=http://localhost:3001
NEXT_PUBLIC_WS_URL=http://localhost:3001
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Build-time UI availability flag for self-host-only controls such as stdio
# connector fields. This does not enable stdio execution or grant App access.
NEXT_PUBLIC_DEFT_SELF_HOSTED=true
# Required when a public server runs modified code; use the exact Corresponding Source.
DEFT_SOURCE_CODE_URL=
# Source builds keep experimental voice huddles opt-in and bake this value into
Expand Down Expand Up @@ -93,7 +96,9 @@ API_PORT=3001
# MCP connector network policy. HTTPS public origins are the default.
# Self-host operators may allowlist exact private/insecure origins (no wildcards).
DEFT_MCP_PRIVATE_ORIGIN_ALLOWLIST=
# Stdio is host-code execution: both this opt-in and an exact command list are required.
# Stdio is host-code execution: DEFT_SELF_HOSTED plus this opt-in and an exact
# command list are required. The public UI flag above does not satisfy them.
DEFT_SELF_HOSTED=true
DEFT_MCP_ENABLE_UNSAFE_STDIO=false
MCP_STDIO_ALLOWED_COMMANDS=

Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ ARG NEXT_PUBLIC_API_URL=__DEFT_API_URL__
ARG NEXT_PUBLIC_WS_URL=__DEFT_WS_URL__
ARG NEXT_PUBLIC_FEATURE_HUDDLES=false
ARG NEXT_PUBLIC_FEATURE_APPS=false
ARG NEXT_PUBLIC_DEFT_SELF_HOSTED=false
ARG DEFT_RELEASE_VERSION=0.3.0-preview.14
ENV NEXT_PUBLIC_APP_URL=$NEXT_PUBLIC_APP_URL
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
ENV NEXT_PUBLIC_WS_URL=$NEXT_PUBLIC_WS_URL
ENV NEXT_PUBLIC_FEATURE_HUDDLES=$NEXT_PUBLIC_FEATURE_HUDDLES
ENV NEXT_PUBLIC_FEATURE_APPS=$NEXT_PUBLIC_FEATURE_APPS
ENV NEXT_PUBLIC_DEFT_SELF_HOSTED=$NEXT_PUBLIC_DEFT_SELF_HOSTED
ENV DEFT_RELEASE_VERSION=$DEFT_RELEASE_VERSION

COPY --from=deps /app/node_modules ./node_modules
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ Modules add domain records, relationships, and native views. Apps package Module

The bundled **Contacts** module is the first example of this model. The goal is not to turn Deft's core into every application a company might need, but to let new capabilities live on the same shared substrate instead of becoming another disconnected system.

See [Deft, App Kit and domain App boundaries](docs/app-boundaries.md) for the authoring contract, native UI conventions, permissions and current execution limits.

## Product surfaces

### Chat keeps the source conversation attached
Expand Down
17 changes: 16 additions & 1 deletion apps/api/src/lib/agent-action-proposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,20 @@ export function getActionCompilerToolsForPrompt(promptContent: string, allowedAc
return tools;
}

function hasExplicitOutcomeLabelForEveryTask(plain: string, taskCount: number): boolean {
const ordinalLabels = new Set<string>();
const ordinalAliases: Record<string, string> = {
first: '1', second: '2', third: '3', fourth: '4', fifth: '5',
sixth: '6', seventh: '7', eighth: '8', ninth: '9', tenth: '10',
};
const labelPattern = /\b(?:the\s+)?(first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|\d+(?:st|nd|rd|th))\s+(?:task|todo|ticket)\s+(?:title\s*:|outcome\s+is\s*:)\s*(?=(?:["'‘“]\s*)?[\p{L}\p{N}])/giu;
for (const match of plain.matchAll(labelPattern)) {
const ordinal = match[1]!.toLowerCase();
ordinalLabels.add(ordinalAliases[ordinal] ?? ordinal.replace(/(?:st|nd|rd|th)$/i, ''));
}
return ordinalLabels.size >= taskCount;
}

export function validateCompiledIntentAlignment(
promptContent: string,
actions: ProposedAgentAction[],
Expand Down Expand Up @@ -489,7 +503,8 @@ export function validateCompiledIntentAlignment(
if (taskActions.length > 0) {
const suppliedOutcome = /\b(?:titled|called|named|name\s+(?:it|this))\b/i.test(plain)
|| /\b(?:task|todo|ticket)\s+(?:to|for|about)\s+\S/i.test(plain)
|| /\b(?:need|needs|should|must)\s+to\s+\S/i.test(plain);
|| /\b(?:need|needs|should|must)\s+to\s+\S/i.test(plain)
|| hasExplicitOutcomeLabelForEveryTask(plain, taskActions.length);
if (!suppliedOutcome) {
return {
blocked: true,
Expand Down
Loading
Loading