@hilbras/omninode 2.0.0-alpha.16 → 2.0.0-alpha.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -509,6 +509,24 @@ interface TaskResult {
509
509
  reportId?: string;
510
510
  /** Structured reports produced by protocol-mode agents (Phase 6 builds on this). */
511
511
  reports?: Report[];
512
+ /** Protocol-mode diagnostics (descriptor, questions, violations) — see docs/PROTOCOL.md. */
513
+ protocol?: {
514
+ protocol: string;
515
+ legacy: boolean;
516
+ descriptor?: {
517
+ protocol: string;
518
+ name: string;
519
+ version?: string;
520
+ capabilities: string[];
521
+ supports: string[];
522
+ };
523
+ questions: Array<{
524
+ questionId: string;
525
+ question: string;
526
+ answer?: string;
527
+ }>;
528
+ violations: string[];
529
+ };
512
530
  /** Truncated verbatim agent output, kept for report extraction and audit. */
513
531
  rawOutput?: string;
514
532
  error?: string;
@@ -3212,6 +3230,6 @@ declare function migrateProjectStores(directory?: string, options?: {
3212
3230
  checkOnly?: boolean;
3213
3231
  }): Promise<MigrationReport[]>;
3214
3232
 
3215
- declare const OMNINODE_VERSION = "2.0.0-alpha.16";
3233
+ declare const OMNINODE_VERSION = "2.0.0-alpha.17";
3216
3234
 
3217
3235
  export { AgentAdapterRegistry, type AgentConfig, type AgentConfigYaml, type AgentDescriptor, AgentError, type AgentInfo, type AgentInputMode, type AgentIntegrationType, AgentRegistry, type AgentStatus, type AgentTaskInput, type AgentTaskOutput, type AgentToNodeMessage, type AggregateOptions, type AggregatedFinding, type AggregatedRecommendation, type AppConfig, type AppConfigInput, type AppConfigYaml, type ArtifactKind, type ArtifactPayload, type AskedQuestion, type AuditAction, type AuditEvent, type AuditSink, type AuditSink as AuditStore, type ChatFn, type ChatMessage, type ChatRequest, type ChatResponse, type ChatRole, type ChatStreamChunk, type ChatUsage, type CollectionDiagnostics, type CombinedMeta, type CombinedReport, type CombinedReportFilter, type Confidence, ConfigError, type ConfigSources, type ConflictPosition, ConsoleLogSink, type CreateTaskInput, type CwdValidation, DEFAULT_MAX_OUTPUT_BYTES, type DecodeResult, type DefaultChatOptions, type DiscoveryResult, type DocumentState, type Durability, type EnvPolicy, type EnvelopeMeta, type Evidence, type EvidenceInput, type EvidenceKind, type ExecutionRecord, type ExtractionMeta, FileAuditLog, FilePipelineRunStore, FilePlanStore, FileReportStore, FileTaskStore, type Finding, type FindingOrigin, type FindingSeverity, type FindingSource, type HelloResult, HeuristicPlanner, type HttpRequestOptions, type HttpResponse, type IAgent, type IAgentAdapter, type IChatProvider, type IMemoryProvider, type IPipelineExecutor, type IPlanner, type IProvider, type JsonDocument, JsonFileStore, type JsonFileStoreOptions, KNOWN_PROFILES, type LoadConfigOptions, type LoadConfigResult, LocalMemoryProvider, type LogFormat, type LogLevel, type LogSink, Logger, type LoggerOptions, MAX_CONTEXT_CHARS, MAX_MESSAGE_BYTES, MAX_REPORT_BYTES, type MemoryCategory, type MemoryContextQuery, type MemoryEntry, MemoryError, type MemoryProviderConfig, type MemoryProviderMetadata, type MemoryQuery, type MemoryScope, MemoryService, type MemoryServiceOptions, LocalMemoryProvider as MemoryStore, type MemoryTaskContext, type MessageEnvelope, type MigrationReport, type Modality, type ModelCapabilities, type ModelFilter, type ModelInfo, ModelPlanner, ModelRegistry, type ModelStatus, type NodeToAgentMessage, OMNINODE_VERSION, OPENAI_COMPATIBLE_TYPES, type OmniHilbrasConnectionResult, OmniHilbrasProvider, OmniNodeError, type OmniNodeErrorCode, type OmniNodeErrorOptions, OpenAICompatibleProvider, PROTOCOL_V2, type PipelineConfigYaml, type PipelineDefinition, PipelineEngine, type PipelineEngineOptions, PipelineError, type PipelineRun, type PipelineRunAttempt, type PipelineRunFilter, type PipelineRunOptions, type PipelineRunStatus, type PipelineRunStore, type PipelineStep, type PipelineStepCondition, type PipelineStepConfigYaml, type PipelineStepKind, type PipelineStepRun, type PipelineRunStore as PipelineStore, type Plan, type PlanFilter, type PlanJsonResult, type PlanRequest, type PlanStep, type PlanStore, type PlanValidationIssue, type PlanValidationResult, type PlannerConfigYaml, PlannerError, ProcessAgent, ProcessAgentAdapter, type ProfileName, type Project, type ProjectConfigYaml, ProjectStores, type ProtocolAgentToNodeType, ProtocolDecoder, type ProtocolEnvelope, ProtocolError, type ProtocolMessageType, type ProtocolNodeToAgentType, ProtocolSession, type ProtocolViolation, type ProtocolViolationCode, type ProviderAuthentication, type ProviderCapability, type ProviderConfig, type ProviderConfigYaml, ProviderError, type ProviderErrorKind, type ProviderHealth, type ProviderStatus, type ProviderType, type QuestionPayload, type QuestionResponder, type RememberaConfig, RememberaMemoryProvider, type Report, type ReportArtifact, type ReportConflict, type ReportFilter, type ReportPayload, ReportService, type ReportStore, type ReportValidationIssue, type ReportValidationResult, type RoleConfigYaml, type RoleDefinition, RoleRegistry, type RunPipelineOptions, SCHEMA_VERSION, STORE_FILES, SUPPORTED_PROTOCOL_VERSIONS, type SecretFinding, type SessionIds, TERMINAL_TASK_STATUSES, type Task, type TaskContext, TaskEngine, type TaskEngineOptions, TaskError, type TaskPayload, type TaskResult, type TaskStatus, type TaskStore, type TaskStoreFilter, type WritableLike, agentConfigSchema, aggregateReports, appConfigSchema, applyDefaults, applyEnvOverrides, authHeaders, buildAgentRegistry, buildChildEnv, buildHello, buildHelloAck, buildPipelineEngine, buildPlanner, buildPlannerContext, buildRoleRegistry, composeTaskText, configDiagnostics, configureLogger, createAgent, createDefaultChatFn, createMemoryProvider, createProvider, createTaskEngine, decodeMessage, decodeStream, defaultMetadata, defaultProjectConfigYaml, defaultSearch, describeExit, describeSecretFindings, detectConflicts, encodeMessage, envelope, expandEnvRefs, extractMessage, extractReportFromText, findConfigFile, inspectDocument, isNetworkError, isOmniNodeError, isRetryable, isSupportedProtocol, isTimeoutError, keywords, killTree, kindFromStatus, loadConfig, loadConfigDetailed, logger, mergeConfig, migrateProjectStores, newMessageId, normalizeEvidence, normalizeFinding, parseHello, parsePlanJson, parseRetryAfter, pipelineConfigSchema, pipelineStepConfigSchema, planJsonSchema, plannerConfigSchema, projectConfigSchema, providerConfigSchema, providerHttpError, providerTransportError, readDocument, registryKey, requestJson, requireCompletion, resolveApiKey, resolveEnvPolicy, resolveProfile, roleConfigSchema, sanitizeChunk, scanForInlineSecrets, similar, userConfigPath, validateEnvelope, validatePlan, validateReport, validateWorkingDirectory, writeFileAtomic };
package/dist/index.js CHANGED
@@ -410,6 +410,7 @@ function loadConfigDetailed(options = {}) {
410
410
  { details: { issues } }
411
411
  );
412
412
  }
413
+ assertUniqueNames(parsed.data);
413
414
  return {
414
415
  config: toAppConfig(parsed.data),
415
416
  sources: {
@@ -421,6 +422,26 @@ function loadConfigDetailed(options = {}) {
421
422
  }
422
423
  };
423
424
  }
425
+ function assertUniqueNames(data) {
426
+ const groups = [
427
+ ["provider", data.project.providers.map((p) => p.name)],
428
+ ["agent", data.project.agents.map((a) => a.name)],
429
+ ["role", data.project.roles.map((r) => r.id)],
430
+ ["pipeline", data.project.pipelines.map((p) => p.id)]
431
+ ];
432
+ for (const [kind, names] of groups) {
433
+ const seen = /* @__PURE__ */ new Set();
434
+ for (const name of names) {
435
+ if (seen.has(name)) {
436
+ throw new ConfigError(
437
+ "CONFIG_INVALID",
438
+ `Duplicate ${kind} name "${name}" \u2014 every ${kind} must have a unique name.`
439
+ );
440
+ }
441
+ seen.add(name);
442
+ }
443
+ }
444
+ }
424
445
  function readConfigDocument(path2, optionsEnv) {
425
446
  const raw = readFileSync(path2, "utf8");
426
447
  const secretFindings = scanForInlineSecrets(raw);
@@ -2403,6 +2424,7 @@ var TaskEngine = class {
2403
2424
  const result = {
2404
2425
  ...output.summary !== void 0 ? { summary: output.summary } : {},
2405
2426
  ...output.reports !== void 0 && output.reports.length > 0 ? { reports: output.reports } : {},
2427
+ ...output.protocol !== void 0 ? { protocol: output.protocol } : {},
2406
2428
  // Keep the verbatim output (bounded) for report extraction and audit.
2407
2429
  ...output.rawOutput !== void 0 && output.rawOutput.length > 0 ? { rawOutput: output.rawOutput.slice(0, 1e4) } : {},
2408
2430
  ...output.error !== void 0 ? { error: output.error } : {},
@@ -4407,7 +4429,7 @@ async function migrateProjectStores(directory = `${process.cwd()}/.omninode`, op
4407
4429
  }
4408
4430
 
4409
4431
  // src/version.ts
4410
- var OMNINODE_VERSION = "2.0.0-alpha.16";
4432
+ var OMNINODE_VERSION = "2.0.0-alpha.17";
4411
4433
  export {
4412
4434
  AgentAdapterRegistry,
4413
4435
  AgentError,