@qloo/qloo-harness 0.1.18 → 0.1.19

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/README.md CHANGED
@@ -23,6 +23,9 @@ Per-turn call budgets and repeated-call detection stop accidental tool loops.
23
23
  Qloo workflow state is stored as a versioned, bounded session entry so the
24
24
  latest intent and provenance survive resume and branching. A resumed or forked
25
25
  `build` session is automatically downgraded to read-only `plan` authority.
26
+ User-confirmed entity and tag matches are stored separately with their semantic
27
+ role and target scope, then reused before later tool calls so the same
28
+ ambiguity is not presented repeatedly.
26
29
  Its responsive opening mark interprets Qloo's rounded wordmark and connected
27
30
  taste graph in terminal-native line art, using the Qloo purple-to-blue palette
28
31
  in truecolor and 256-color terminals.
@@ -50,8 +53,40 @@ restored when the runtime exits.
50
53
 
51
54
  ## Install and Run
52
55
 
53
- The harness currently runs from source. Prepare it once from the repository
54
- root:
56
+ Requirements:
57
+
58
+ - Node.js 22.19.0 or newer.
59
+ - pnpm 11 or newer for the recommended installation path.
60
+
61
+ Install the public
62
+ [`@qloo/qloo-harness`](https://www.npmjs.com/package/@qloo/qloo-harness)
63
+ package globally with pnpm:
64
+
65
+ ```sh
66
+ pnpm add --global @qloo/qloo-harness
67
+ ```
68
+
69
+ Or use npm instead:
70
+
71
+ ```sh
72
+ npm install --global @qloo/qloo-harness
73
+ ```
74
+
75
+ You only need one of those install commands. If pnpm reports that its global
76
+ bin directory is not on `PATH`, run `pnpm setup`, open a new terminal, and
77
+ retry the pnpm install.
78
+
79
+ Confirm the installation, then start the harness:
80
+
81
+ ```sh
82
+ qloo --version
83
+ qloo
84
+ ```
85
+
86
+ ### Run from Source
87
+
88
+ Contributors can prepare the repository once instead of installing the public
89
+ package:
55
90
 
56
91
  ```sh
57
92
  npm ci
@@ -70,29 +105,23 @@ To inspect the available commands without starting an interactive session:
70
105
  node apps/qloo-harness/dist/bin.js --help
71
106
  ```
72
107
 
73
- ### Optional Local Global Install
108
+ When working from source, replace `qloo` in the examples below with
109
+ `node apps/qloo-harness/dist/bin.js`.
74
110
 
75
- The harness does not need to be published to npm's registry to provide a bare
76
- `qloo` command. Build the verified tarball, then install that local artifact:
111
+ ### Test a Local Release Artifact
112
+
113
+ To test unpublished changes through the same global-install shape, build the
114
+ verified tarball and install that local artifact:
77
115
 
78
116
  ```sh
79
117
  npm run pack:qloo-harness
80
118
  QLOO_HARNESS_VERSION="$(node -p "require('./apps/qloo-harness/package.json').version")"
81
- npm install --global \
82
- "./build/qloo-harness/qloo-qloo-harness-$QLOO_HARNESS_VERSION.tgz"
83
-
84
- qloo --version
85
- qloo
119
+ QLOO_ARTIFACT="$(pwd -P)/build/qloo-harness/qloo-qloo-harness-$QLOO_HARNESS_VERSION.tgz"
120
+ (cd /tmp && pnpm add --global "$QLOO_ARTIFACT")
86
121
  ```
87
122
 
88
- This creates the npm-global `qloo` link on the current machine without using a
89
- public registry package. Someone who already has the verified `.tgz` can skip
90
- the pack step and install its absolute path directly.
91
-
92
- Without that optional installation, replace `qloo` in the examples below with
93
- `node apps/qloo-harness/dist/bin.js` from the repository root. Interactive
94
- startup requires TTY stdin and stdout so it cannot accidentally consume piped
95
- automation input.
123
+ Interactive startup requires TTY stdin and stdout so it cannot accidentally
124
+ consume piped automation input.
96
125
  `qloo api <command>` and direct legacy verbs execute the existing CLI through
97
126
  its import-safe runner; no subprocess is used.
98
127
 
@@ -205,8 +234,8 @@ qloo update --force # reinstall or explicitly downgrade
205
234
  qloo update --timeout 300 # bound each install phase to five minutes
206
235
  ```
207
236
 
208
- Self-update applies only to a future global npm or pnpm installation. A source
209
- checkout should be updated through Git and rebuilt with `npm run build`.
237
+ Self-update applies only to a global npm or pnpm installation. A source checkout
238
+ should be updated through Git and rebuilt with `npm run build`.
210
239
 
211
240
  Self-update first installs and smoke-checks the candidate in an isolated
212
241
  location, then activates it with whichever supported package manager owns the
@@ -232,8 +261,8 @@ The guarded release artifact is built with `npm run pack:qloo-harness`. Its
232
261
  release output compiles the unpublished Qloo client, tool schema, and legacy
233
262
  CLI into the harness while leaving pinned Pi as an ordinary registry
234
263
  dependency. The release gate installs and reinstalls the artifact with both npm
235
- and pnpm, including a pnpm-owned `qloo update --force` smoke. A future registry
236
- package will be published only from that verified artifact with
264
+ and pnpm, including a pnpm-owned `qloo update --force` smoke. Registry releases
265
+ are published only from that verified artifact with
237
266
  `npm run publish:qloo-harness`; direct source `npm pack` and `npm publish` are
238
267
  rejected by `prepack`.
239
268
 
@@ -263,6 +292,10 @@ The default `native` provider runs entirely inside the harness and uses Qloo
263
292
  for compatibility. Tag concepts use Qloo's semantic search, retain its returned
264
293
  rank, and are locally scoped to the requested entity domain when the response
265
294
  includes parent metadata. Identifiers and one exact normalized name proceed.
295
+ For entity names with additional context, the native provider compares the
296
+ supplied terms with candidate names, descriptions, types, and locations. A
297
+ unique candidate matching every term can proceed with a warning and visible
298
+ alternatives; otherwise only the context-compatible choices are shown.
266
299
  Unscored semantic candidates become guided choices instead of having
267
300
  popularity or result order relabeled as confidence. Entity and tag outcomes are
268
301
  cached in a bounded 15-minute session-local cache. No taste-resolver process,
@@ -302,6 +335,14 @@ input. Cache hits and all semantic choices remain visible in provenance.
302
335
  Resolver selection is never enabled by the mere presence of a URL and a
303
336
  failure never silently falls back to native tag search.
304
337
 
338
+ The interactive harness adds confirmed-choice memory above that lookup cache.
339
+ A choice is keyed by normalized input, entity-versus-tag role, and target scope;
340
+ it is never reused across an incompatible tag target or entity type. Choices
341
+ survive session resume and branching, while `/matches` can inspect or forget
342
+ them. Several unresolved inputs from one workflow appear in one review dialog
343
+ and are applied in one retry. Explicit location and naming terms also narrow
344
+ entity candidates before the harness asks.
345
+
305
346
  `qloo_capabilities` returns the exact shared input/result schemas, active
306
347
  resolution strategy, and source documentation for selected operations without
307
348
  a network request. It identifies the harness, canonical Node MCP, and canonical
@@ -323,7 +364,8 @@ execution metadata respectively. `/next` offers operation-aware continuations.
323
364
  `/doctor [network]` runs explicit diagnostics,
324
365
  `/raw [page|next|prev]` shows paginated redacted detail from the latest live
325
366
  normalized result, and `/retry` replays its recorded input once without model
326
- reconstruction. A DNS, connection, TLS, timeout, authentication, or resolver
367
+ reconstruction. `/matches` inspects or forgets user-confirmed entity and tag
368
+ choices. A DNS, connection, TLS, timeout, authentication, or resolver
327
369
  connection failure automatically runs one bounded diagnostic per turn and
328
370
  presents the most useful recovery step without dumping the full report. Qloo
329
371
  tool calls render the interpreted input, concise result,
package/dist/cli.js CHANGED
@@ -5,7 +5,7 @@ const require = __qlooCreateRequire(import.meta.url);
5
5
  import { launchInteractiveHarness } from "./app.js";
6
6
  import { isQlooHarnessProfile, QLOO_DEFAULT_PROFILE, QLOO_HARNESS_PROFILES } from "./profiles.js";
7
7
  import { MissingModelAuthenticationError } from "./runtime/pi-adapter.js";
8
- var HARNESS_VERSION = "0.1.18";
8
+ var HARNESS_VERSION = "0.1.19";
9
9
  var HARNESS_HELP = `Qloo terminal harness
10
10
 
11
11
  Usage:
package/dist/exec.js CHANGED
@@ -195,12 +195,12 @@ var QLOO_LIMIT_SCHEMA = Type.Optional(Type.Integer({
195
195
  var QLOO_ENTITY_INPUTS_SCHEMA = Type.Array(Type.String({ minLength: 1 }), {
196
196
  minItems: 1,
197
197
  maxItems: 10,
198
- description: "Entity names or Qloo entity UUIDs. Keep one combined taste profile in one call."
198
+ description: "Named entities or Qloo entity UUIDs; use tag fields for abstract concepts."
199
199
  });
200
200
  var QLOO_TAG_INPUTS_SCHEMA = Type.Array(Type.String({ minLength: 1 }), {
201
201
  minItems: 1,
202
202
  maxItems: 10,
203
- description: "Natural-language tag concepts or stable Qloo tag URNs."
203
+ description: "Genres, moods, styles, traits, or other concepts, or Qloo tag URNs; not named entities."
204
204
  });
205
205
  var QLOO_DEMOGRAPHIC_SCHEMA = Type.String({
206
206
  minLength: 1,
@@ -360,6 +360,7 @@ var QLOO_WORKFLOW_METADATA = {
360
360
  promptSnippet: "Recommend entities from a combined Qloo taste profile",
361
361
  promptGuidelines: [
362
362
  "Pass every related taste and audience signal together in one qloo_recommend call.",
363
+ "Put named things in signals; put genres, moods, styles, traits, and concepts such as quiet luxury in signal_tags; reuse returned Qloo UUIDs and tag URNs.",
363
364
  "Use signal_location for audience location and filter_location to constrain result geography.",
364
365
  "Include demographic and location in the same call when both describe the audience."
365
366
  ],
@@ -370,7 +371,10 @@ var QLOO_WORKFLOW_METADATA = {
370
371
  label: "Qloo rank",
371
372
  description: "Rank one supplied option set against one shared entity, location, demographic, and tag profile. Scores from separate calls are not comparable.",
372
373
  promptSnippet: "Rank a caller-supplied shortlist with Qloo",
373
- promptGuidelines: ["Pass every option in one qloo_rank call so scores remain comparable."],
374
+ promptGuidelines: [
375
+ "Pass every option in one qloo_rank call so scores remain comparable.",
376
+ "Put named things in entity fields and concepts in tag fields; reuse returned Qloo UUIDs and tag URNs."
377
+ ],
374
378
  documentation: ["https://docs.qloo.com/reference/insights-api-deep-dive"]
375
379
  },
376
380
  describe: {
package/dist/index.d.ts CHANGED
@@ -161,6 +161,7 @@ declare const QLOO_WORKFLOW_INPUT_SCHEMAS: {
161
161
  limit: Type.TOptional<Type.TInteger>;
162
162
  }>;
163
163
  };
164
+ type QlooWorkflowResolutionInputKind = "entity" | "tag";
164
165
  type QlooRecommendInput = Static<typeof QLOO_WORKFLOW_INPUT_SCHEMAS.recommend>;
165
166
  type QlooRankInput = Static<typeof QLOO_WORKFLOW_INPUT_SCHEMAS.rank>;
166
167
  type QlooDescribeInput = Static<typeof QLOO_WORKFLOW_INPUT_SCHEMAS.describe>;
@@ -673,7 +674,7 @@ interface LaunchInteractiveHarnessOptions {
673
674
  }
674
675
  declare function launchInteractiveHarness(options?: LaunchInteractiveHarnessOptions): Promise<void>;
675
676
 
676
- declare const HARNESS_VERSION = "0.1.18";
677
+ declare const HARNESS_VERSION = "0.1.19";
677
678
  declare const HARNESS_HELP = "Qloo terminal harness\n\nUsage:\n qloo Start guided Qloo chat\n qloo chat Start guided Qloo chat explicitly\n qloo explore Ask grounded Qloo questions (read-only workspace)\n qloo integrate Inspect and design a Qloo integration\n qloo plan Open interactive read-only planning\n qloo plan \"<goal>\" --json\n Create a typed, evidence-backed plan\n qloo build Open approval-gated build mode\n qloo build --plan <plan-id>\n Build from a validated integration plan\n qloo chat --mode <explore|integrate|plan|build>\n qloo --help Show this help\n qloo --version Show the harness version\n\nThe deterministic API CLI and additional harness commands are attached by the\ntop-level qloo command router.";
678
679
  interface HarnessCliDependencies {
679
680
  launch: (profile: QlooHarnessProfile) => Promise<void>;
@@ -933,6 +934,26 @@ interface QlooTextComponent {
933
934
  interface QlooResolutionChoice {
934
935
  readonly input: string;
935
936
  readonly selectedId: string;
937
+ readonly selectedName?: string;
938
+ readonly selectedType?: string;
939
+ readonly field?: string;
940
+ readonly inputKind?: QlooWorkflowResolutionInputKind;
941
+ readonly scope?: string;
942
+ readonly purpose?: "signal" | "include_filter" | "exclude_filter";
943
+ }
944
+ interface QlooResolutionCandidateIssue {
945
+ readonly input: string;
946
+ readonly candidates: readonly Record<string, unknown>[];
947
+ readonly field?: string;
948
+ readonly inputKind?: QlooWorkflowResolutionInputKind;
949
+ readonly scope?: string;
950
+ readonly purpose?: "signal" | "include_filter" | "exclude_filter";
951
+ }
952
+ interface QlooResolutionInputContext {
953
+ readonly field: string;
954
+ readonly inputKind: QlooWorkflowResolutionInputKind;
955
+ readonly scope?: string;
956
+ readonly purpose?: "signal" | "include_filter" | "exclude_filter";
936
957
  }
937
958
  declare function formatQlooResolutionCandidateLabels(candidates: readonly Readonly<Record<string, unknown>>[]): string[];
938
959
  declare function renderQlooCallLines(toolName: string, input: Readonly<Record<string, unknown>>, width: number): string[];
@@ -944,10 +965,8 @@ declare function createQlooCallComponent(toolName: string, input: Readonly<Recor
944
965
  declare function createQlooResultComponent(details: unknown, expanded: boolean, theme: QlooPresentationTheme): QlooTextComponent;
945
966
  declare function paginateQlooResult(detailsValue: Readonly<Record<string, unknown>>, requestedPage: number, pageSize?: number): Record<string, unknown>;
946
967
  declare function parseQlooRawPage(argument: string, currentPage: number): number | undefined;
947
- declare function resolutionCandidates(detailsValue: unknown): readonly {
948
- readonly input: string;
949
- readonly candidates: readonly Record<string, unknown>[];
950
- }[];
968
+ declare function resolutionInputContexts(toolName: string, input: Readonly<Record<string, unknown>>): readonly QlooResolutionInputContext[];
969
+ declare function resolutionCandidates(detailsValue: unknown, toolName?: string, toolInput?: Readonly<Record<string, unknown>>): readonly QlooResolutionCandidateIssue[];
951
970
  declare function applyResolutionChoices(toolName: string, input: Readonly<Record<string, unknown>>, choices: readonly QlooResolutionChoice[]): Record<string, unknown> | undefined;
952
971
 
953
972
  /**
@@ -1082,6 +1101,51 @@ interface CreateProjectContextToolOptions {
1082
1101
  }
1083
1102
  declare function createProjectContextTool(options: CreateProjectContextToolOptions): ToolDefinition;
1084
1103
 
1104
+ declare const QLOO_RESOLUTION_CHOICE_ENTRY_TYPE: "qloo.resolution-choice";
1105
+ declare const QLOO_RESOLUTION_CHOICE_SCHEMA_VERSION: "1.0";
1106
+ interface QlooConfirmedResolutionBinding {
1107
+ readonly tool_name: string;
1108
+ readonly input: string;
1109
+ readonly input_kind: QlooWorkflowResolutionInputKind;
1110
+ readonly field: string;
1111
+ readonly scope?: string;
1112
+ readonly purpose?: "signal" | "include_filter" | "exclude_filter";
1113
+ readonly selected: {
1114
+ readonly id: string;
1115
+ readonly name: string;
1116
+ readonly type?: string;
1117
+ };
1118
+ readonly source: "user";
1119
+ }
1120
+ type QlooResolutionChoiceEvent = {
1121
+ readonly schema_version: typeof QLOO_RESOLUTION_CHOICE_SCHEMA_VERSION;
1122
+ readonly action: "remember";
1123
+ readonly choices: readonly QlooConfirmedResolutionBinding[];
1124
+ } | {
1125
+ readonly schema_version: typeof QLOO_RESOLUTION_CHOICE_SCHEMA_VERSION;
1126
+ readonly action: "forget";
1127
+ readonly binding: Pick<QlooConfirmedResolutionBinding, "input" | "input_kind" | "scope">;
1128
+ } | {
1129
+ readonly schema_version: typeof QLOO_RESOLUTION_CHOICE_SCHEMA_VERSION;
1130
+ readonly action: "clear";
1131
+ };
1132
+ interface QlooResolutionMemoryApplication {
1133
+ readonly input: Record<string, unknown>;
1134
+ readonly reused: readonly QlooConfirmedResolutionBinding[];
1135
+ }
1136
+ declare class QlooResolutionMemory {
1137
+ #private;
1138
+ clear(): void;
1139
+ list(): readonly QlooConfirmedResolutionBinding[];
1140
+ remember(toolName: string, choices: readonly QlooResolutionChoice[]): readonly QlooConfirmedResolutionBinding[];
1141
+ forget(binding: Pick<QlooConfirmedResolutionBinding, "input" | "input_kind" | "scope">): boolean;
1142
+ restore(entries: readonly unknown[]): void;
1143
+ apply(toolName: string, input: Readonly<Record<string, unknown>>): QlooResolutionMemoryApplication | undefined;
1144
+ }
1145
+ declare function rememberResolutionChoicesEvent(choices: readonly QlooConfirmedResolutionBinding[]): QlooResolutionChoiceEvent;
1146
+ declare function forgetResolutionChoiceEvent(binding: Pick<QlooConfirmedResolutionBinding, "input" | "input_kind" | "scope">): QlooResolutionChoiceEvent;
1147
+ declare function clearResolutionChoicesEvent(): QlooResolutionChoiceEvent;
1148
+
1085
1149
  declare const PINNED_PI_VERSION = "0.84.2";
1086
1150
  declare const BLOCKED_PI_INTERACTIVE_COMMANDS: ReadonlySet<string>;
1087
1151
  declare const PI_SHARE_BLOCK_MESSAGE = "External session sharing is disabled in the Qloo harness.";
@@ -1317,5 +1381,5 @@ interface CanonicalMcpServerLifecycle {
1317
1381
  declare function startCanonicalMcpServer(options?: CanonicalMcpServerOptions): CanonicalMcpServerLifecycle;
1318
1382
  declare function runQlooMcp(argv: readonly string[], options?: CanonicalMcpServerOptions): number;
1319
1383
 
1320
- export { BLOCKED_PI_INTERACTIVE_COMMANDS, HARNESS_HELP, HARNESS_VERSION, MissingModelAuthenticationError, PINNED_PI_VERSION, PI_AGENT_DIR_ENVIRONMENT_VARIABLE, PI_OFFLINE_ENVIRONMENT_VARIABLE, PI_SHARE_BLOCK_MESSAGE, PI_SKIP_VERSION_CHECK_ENVIRONMENT_VARIABLE, PI_TELEMETRY_ENVIRONMENT_VARIABLE, PI_TRUST_BLOCK_MESSAGE, PI_VERSION, PiCommandPolicyCompatibilityError, PiHarnessRuntime, QLOO_BUILD_HELP, QLOO_DEFAULT_PROFILE, QLOO_EXECUTION_LOG_SCHEMA_VERSION, QLOO_EXEC_EVENT_SCHEMA_VERSION, QLOO_EXEC_HELP, QLOO_EXEC_MAX_INPUT_BYTES, QLOO_GUIDED_GOALS, QLOO_HARNESS_PACKAGE_NAME, QLOO_HARNESS_PROFILES, QLOO_HELP, QLOO_INTEGRATION_PLAN_DRAFT_SCHEMA, QLOO_INTEGRATION_PLAN_ID_PATTERN, QLOO_INTEGRATION_PLAN_MAX_BYTES, QLOO_INTEGRATION_PLAN_MAX_EVIDENCE_BYTES, QLOO_INTEGRATION_PLAN_MAX_GOAL_BYTES, QLOO_INTEGRATION_PLAN_SCHEMA, QLOO_INTEGRATION_PLAN_SCHEMA_VERSION, QLOO_MCP_CONTRACT_RESOURCE_URI, QLOO_MCP_HELP, QLOO_MODEL_RETRY_POLICY, QLOO_NO_GUIDED_START_ENVIRONMENT_VARIABLE, QLOO_PLAN_HELP, QLOO_PROFILE_DEFINITIONS, QLOO_PROJECT_CONTEXT_SCHEMA_VERSION, QLOO_RESOLUTION_PROVIDER_ENVIRONMENT_VARIABLE, QLOO_SESSION_STATE_ENTRY_TYPE, QLOO_SESSION_STATE_SCHEMA_VERSION, QLOO_SETUP_HELP, QLOO_SETUP_SCHEMA_VERSION, QLOO_TASTE_RESOLVER_MIN_MARGIN_ENVIRONMENT_VARIABLE, QLOO_TASTE_RESOLVER_MIN_SCORE_ENVIRONMENT_VARIABLE, QLOO_TASTE_RESOLVER_TAG_ENDPOINT_ENVIRONMENT_VARIABLE, QLOO_TRUSTED_TASTE_RESOLVER_URL_ENVIRONMENT_VARIABLE, QLOO_UPDATE_HELP, QLOO_UPDATE_SPEC_ENVIRONMENT_VARIABLE, QLOO_WORKSPACE_TOOL_NAMES, QlooIntegrationPlanError, QlooResolutionProviderError, QlooWorkflowExecutionError, TASTE_RESOLVER_API_KEY_ENVIRONMENT_VARIABLE, TASTE_RESOLVER_URL_ENVIRONMENT_VARIABLE, applyPiInteractiveCommandPolicy, applyQlooModelRetryPolicy, applyResolutionChoices, buildExploreResourceOptions, buildExploreToolNames, buildHarnessResourceOptions, buildProfileToolNames, createBuildHandoffPrompt, createCliQlooWorkflowExecutor, createDelegatingQlooWorkflowExecutor, createDirectQlooWorkflowExecutor, createDirectQlooWorkflowExecutorFromEnvironment, createExplorePolicyExtension, createFileExecutionObserver, createHarnessPolicyExtension, createIntegrationPlanArtifact, createIntegrationPlanPrompt, createIntegrationPlanSubmissionTool, createMcpQlooWorkflowExecutor, createNativeQlooResolutionProvider, createPiHarnessRuntime, createProjectContextTool, createPublicQlooResolutionProvider, createQlooCallComponent, createQlooResolutionProviderFromEnvironment, createQlooResultComponent, createQlooTools, createQlooToolsFromEnvironment, createTasteResolverAssistedResolutionProvider, createTerminalSetupIO, ensureQlooStateDirectories, findGuidedGoal, formatDoctorReport, formatQlooResolutionCandidateLabels, formatQlooSetupReport, getQlooProfileDefinition, getQlooToolRuntimeInfo, guidedGoalLabel, inferGlobalInstallPrefix, inspectPiAuthFile, inspectProjectContext, inspectQlooResolutionProviderConfiguration, isBlockedPiInteractiveCommand, isQlooHarnessProfile, launchInteractiveHarness, loadHarnessResources, loadIntegrationPlanArtifact, paginateQlooResult, parseQlooRawPage, probeTasteResolverHealth, qlooNextActions, renderQlooCallLines, renderQlooResultLines, requireAuthenticatedModel, resolutionCandidates, resolveQlooPaths, runDoctor, runHarnessCli, runQloo, runQlooBuild, runQlooExec, runQlooMcp, runQlooPlan, runQlooSetup, runQlooUpdate, saveIntegrationPlanArtifact, setupQloo, startCanonicalMcpServer, validateExploreTools, withPiAgentDirectory, withPiPrivacyDefaults };
1321
- export type { CanonicalMcpServerLifecycle, CanonicalMcpServerOptions, CreateDelegatingQlooExecutorOptions, CreateDirectQlooWorkflowExecutorFromEnvironmentOptions, CreateFileExecutionObserverOptions, CreateIntegrationPlanArtifactOptions, CreateIntegrationPlanSubmissionOptions, CreatePiHarnessRuntimeOptions, CreateProjectContextToolOptions, CreateQlooResolutionProviderFromEnvironmentOptions, CreateQlooToolsFromEnvironmentOptions, CreateQlooToolsOptions, DoctorCheck, DoctorReport, EnsureQlooStateOptions, HarnessPrerequisite, HarnessPrerequisiteContext, HarnessResources, HarnessRuntime, HarnessRuntimeFactory, InspectProjectContextOptions, InspectQlooResolutionProviderConfigurationOptions, IntegrationPlanSubmission, LaunchInteractiveHarnessOptions, LoadHarnessResourcesOptions, LoadIntegrationPlanArtifactOptions, NativeQlooResolutionProviderOptions, PiAuthFileInspection, ProjectContextResult, QlooEntityResolutionRequest, QlooExecCompletedEvent, QlooExecEvent, QlooExecFailedEvent, QlooExecStartedEvent, QlooExecutionLogRecord, QlooGuidedGoal, QlooGuidedGoalId, QlooGuidedStarter, QlooHarnessProfile, QlooIntegrationPlan, QlooIntegrationPlanDraft, QlooIntegrationPlanErrorCode, QlooInteractiveCommandActions, QlooNextAction, QlooPaths, QlooPresentationTheme, QlooProfileDefinition, QlooProjectContext, QlooResolutionBatch, QlooResolutionChoice, QlooResolutionClient, QlooResolutionContext, QlooResolutionProvider, QlooResolutionProviderConfigurationInspection, QlooResolutionProviderErrorCode, QlooRouterDependencies, QlooSetupChoice, QlooSetupIO, QlooSetupModelRuntime, QlooSetupOptions, QlooSetupReport, QlooTagResolutionPurpose, QlooTagResolutionRequest, QlooTextComponent, QlooToolClient, QlooToolRuntimeInfo, QlooTransportDescriptor, QlooTransportKind, QlooWorkflowExecution, QlooWorkflowExecutionContext, QlooWorkflowExecutionObserver, QlooWorkflowExecutor, QlooWorkflowFailure, QlooWorkflowResultEnvelope, ResolveQlooPathsOptions, RunDoctorOptions, RunQlooBuildOptions, RunQlooExecOptions, RunQlooPlanOptions, RunQlooSetupOptions, RunQlooUpdateOptions, TasteResolverHealthKind, TasteResolverHealthProbeOptions, TasteResolverHealthProbeResult, TasteResolverResolutionProviderOptions, TasteResolverTagEndpoint };
1384
+ export { BLOCKED_PI_INTERACTIVE_COMMANDS, HARNESS_HELP, HARNESS_VERSION, MissingModelAuthenticationError, PINNED_PI_VERSION, PI_AGENT_DIR_ENVIRONMENT_VARIABLE, PI_OFFLINE_ENVIRONMENT_VARIABLE, PI_SHARE_BLOCK_MESSAGE, PI_SKIP_VERSION_CHECK_ENVIRONMENT_VARIABLE, PI_TELEMETRY_ENVIRONMENT_VARIABLE, PI_TRUST_BLOCK_MESSAGE, PI_VERSION, PiCommandPolicyCompatibilityError, PiHarnessRuntime, QLOO_BUILD_HELP, QLOO_DEFAULT_PROFILE, QLOO_EXECUTION_LOG_SCHEMA_VERSION, QLOO_EXEC_EVENT_SCHEMA_VERSION, QLOO_EXEC_HELP, QLOO_EXEC_MAX_INPUT_BYTES, QLOO_GUIDED_GOALS, QLOO_HARNESS_PACKAGE_NAME, QLOO_HARNESS_PROFILES, QLOO_HELP, QLOO_INTEGRATION_PLAN_DRAFT_SCHEMA, QLOO_INTEGRATION_PLAN_ID_PATTERN, QLOO_INTEGRATION_PLAN_MAX_BYTES, QLOO_INTEGRATION_PLAN_MAX_EVIDENCE_BYTES, QLOO_INTEGRATION_PLAN_MAX_GOAL_BYTES, QLOO_INTEGRATION_PLAN_SCHEMA, QLOO_INTEGRATION_PLAN_SCHEMA_VERSION, QLOO_MCP_CONTRACT_RESOURCE_URI, QLOO_MCP_HELP, QLOO_MODEL_RETRY_POLICY, QLOO_NO_GUIDED_START_ENVIRONMENT_VARIABLE, QLOO_PLAN_HELP, QLOO_PROFILE_DEFINITIONS, QLOO_PROJECT_CONTEXT_SCHEMA_VERSION, QLOO_RESOLUTION_CHOICE_ENTRY_TYPE, QLOO_RESOLUTION_CHOICE_SCHEMA_VERSION, QLOO_RESOLUTION_PROVIDER_ENVIRONMENT_VARIABLE, QLOO_SESSION_STATE_ENTRY_TYPE, QLOO_SESSION_STATE_SCHEMA_VERSION, QLOO_SETUP_HELP, QLOO_SETUP_SCHEMA_VERSION, QLOO_TASTE_RESOLVER_MIN_MARGIN_ENVIRONMENT_VARIABLE, QLOO_TASTE_RESOLVER_MIN_SCORE_ENVIRONMENT_VARIABLE, QLOO_TASTE_RESOLVER_TAG_ENDPOINT_ENVIRONMENT_VARIABLE, QLOO_TRUSTED_TASTE_RESOLVER_URL_ENVIRONMENT_VARIABLE, QLOO_UPDATE_HELP, QLOO_UPDATE_SPEC_ENVIRONMENT_VARIABLE, QLOO_WORKSPACE_TOOL_NAMES, QlooIntegrationPlanError, QlooResolutionMemory, QlooResolutionProviderError, QlooWorkflowExecutionError, TASTE_RESOLVER_API_KEY_ENVIRONMENT_VARIABLE, TASTE_RESOLVER_URL_ENVIRONMENT_VARIABLE, applyPiInteractiveCommandPolicy, applyQlooModelRetryPolicy, applyResolutionChoices, buildExploreResourceOptions, buildExploreToolNames, buildHarnessResourceOptions, buildProfileToolNames, clearResolutionChoicesEvent, createBuildHandoffPrompt, createCliQlooWorkflowExecutor, createDelegatingQlooWorkflowExecutor, createDirectQlooWorkflowExecutor, createDirectQlooWorkflowExecutorFromEnvironment, createExplorePolicyExtension, createFileExecutionObserver, createHarnessPolicyExtension, createIntegrationPlanArtifact, createIntegrationPlanPrompt, createIntegrationPlanSubmissionTool, createMcpQlooWorkflowExecutor, createNativeQlooResolutionProvider, createPiHarnessRuntime, createProjectContextTool, createPublicQlooResolutionProvider, createQlooCallComponent, createQlooResolutionProviderFromEnvironment, createQlooResultComponent, createQlooTools, createQlooToolsFromEnvironment, createTasteResolverAssistedResolutionProvider, createTerminalSetupIO, ensureQlooStateDirectories, findGuidedGoal, forgetResolutionChoiceEvent, formatDoctorReport, formatQlooResolutionCandidateLabels, formatQlooSetupReport, getQlooProfileDefinition, getQlooToolRuntimeInfo, guidedGoalLabel, inferGlobalInstallPrefix, inspectPiAuthFile, inspectProjectContext, inspectQlooResolutionProviderConfiguration, isBlockedPiInteractiveCommand, isQlooHarnessProfile, launchInteractiveHarness, loadHarnessResources, loadIntegrationPlanArtifact, paginateQlooResult, parseQlooRawPage, probeTasteResolverHealth, qlooNextActions, rememberResolutionChoicesEvent, renderQlooCallLines, renderQlooResultLines, requireAuthenticatedModel, resolutionCandidates, resolutionInputContexts, resolveQlooPaths, runDoctor, runHarnessCli, runQloo, runQlooBuild, runQlooExec, runQlooMcp, runQlooPlan, runQlooSetup, runQlooUpdate, saveIntegrationPlanArtifact, setupQloo, startCanonicalMcpServer, validateExploreTools, withPiAgentDirectory, withPiPrivacyDefaults };
1385
+ export type { CanonicalMcpServerLifecycle, CanonicalMcpServerOptions, CreateDelegatingQlooExecutorOptions, CreateDirectQlooWorkflowExecutorFromEnvironmentOptions, CreateFileExecutionObserverOptions, CreateIntegrationPlanArtifactOptions, CreateIntegrationPlanSubmissionOptions, CreatePiHarnessRuntimeOptions, CreateProjectContextToolOptions, CreateQlooResolutionProviderFromEnvironmentOptions, CreateQlooToolsFromEnvironmentOptions, CreateQlooToolsOptions, DoctorCheck, DoctorReport, EnsureQlooStateOptions, HarnessPrerequisite, HarnessPrerequisiteContext, HarnessResources, HarnessRuntime, HarnessRuntimeFactory, InspectProjectContextOptions, InspectQlooResolutionProviderConfigurationOptions, IntegrationPlanSubmission, LaunchInteractiveHarnessOptions, LoadHarnessResourcesOptions, LoadIntegrationPlanArtifactOptions, NativeQlooResolutionProviderOptions, PiAuthFileInspection, ProjectContextResult, QlooConfirmedResolutionBinding, QlooEntityResolutionRequest, QlooExecCompletedEvent, QlooExecEvent, QlooExecFailedEvent, QlooExecStartedEvent, QlooExecutionLogRecord, QlooGuidedGoal, QlooGuidedGoalId, QlooGuidedStarter, QlooHarnessProfile, QlooIntegrationPlan, QlooIntegrationPlanDraft, QlooIntegrationPlanErrorCode, QlooInteractiveCommandActions, QlooNextAction, QlooPaths, QlooPresentationTheme, QlooProfileDefinition, QlooProjectContext, QlooResolutionBatch, QlooResolutionCandidateIssue, QlooResolutionChoice, QlooResolutionChoiceEvent, QlooResolutionClient, QlooResolutionContext, QlooResolutionInputContext, QlooResolutionMemoryApplication, QlooResolutionProvider, QlooResolutionProviderConfigurationInspection, QlooResolutionProviderErrorCode, QlooRouterDependencies, QlooSetupChoice, QlooSetupIO, QlooSetupModelRuntime, QlooSetupOptions, QlooSetupReport, QlooTagResolutionPurpose, QlooTagResolutionRequest, QlooTextComponent, QlooToolClient, QlooToolRuntimeInfo, QlooTransportDescriptor, QlooTransportKind, QlooWorkflowExecution, QlooWorkflowExecutionContext, QlooWorkflowExecutionObserver, QlooWorkflowExecutor, QlooWorkflowFailure, QlooWorkflowResultEnvelope, ResolveQlooPathsOptions, RunDoctorOptions, RunQlooBuildOptions, RunQlooExecOptions, RunQlooPlanOptions, RunQlooSetupOptions, RunQlooUpdateOptions, TasteResolverHealthKind, TasteResolverHealthProbeOptions, TasteResolverHealthProbeResult, TasteResolverResolutionProviderOptions, TasteResolverTagEndpoint };
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import { createIntegrationPlanPrompt, QLOO_PLAN_HELP, runQlooPlan } from "./plan
10
10
  import { getQlooProfileDefinition, isQlooHarnessProfile, QLOO_DEFAULT_PROFILE, QLOO_HARNESS_PROFILES, QLOO_PROFILE_DEFINITIONS } from "./profiles.js";
11
11
  import { formatDoctorReport, inspectPiAuthFile, runDoctor } from "./doctor.js";
12
12
  import { createQlooTools, createDirectQlooWorkflowExecutor, createDirectQlooWorkflowExecutorFromEnvironment, createQlooToolsFromEnvironment, getQlooToolRuntimeInfo } from "./qloo-tools.js";
13
- import { applyResolutionChoices, createQlooCallComponent, createQlooResultComponent, formatQlooResolutionCandidateLabels, paginateQlooResult, parseQlooRawPage, renderQlooCallLines, renderQlooResultLines, resolutionCandidates } from "./qloo-presentation.js";
13
+ import { applyResolutionChoices, createQlooCallComponent, createQlooResultComponent, formatQlooResolutionCandidateLabels, paginateQlooResult, parseQlooRawPage, renderQlooCallLines, renderQlooResultLines, resolutionCandidates, resolutionInputContexts } from "./qloo-presentation.js";
14
14
  import { createNativeQlooResolutionProvider, createPublicQlooResolutionProvider, createQlooResolutionProviderFromEnvironment, createTasteResolverAssistedResolutionProvider, inspectQlooResolutionProviderConfiguration, probeTasteResolverHealth, QLOO_RESOLUTION_PROVIDER_ENVIRONMENT_VARIABLE, QLOO_TASTE_RESOLVER_MIN_MARGIN_ENVIRONMENT_VARIABLE, QLOO_TASTE_RESOLVER_MIN_SCORE_ENVIRONMENT_VARIABLE, QLOO_TASTE_RESOLVER_TAG_ENDPOINT_ENVIRONMENT_VARIABLE, QLOO_TRUSTED_TASTE_RESOLVER_URL_ENVIRONMENT_VARIABLE, QlooResolutionProviderError, TASTE_RESOLVER_API_KEY_ENVIRONMENT_VARIABLE, TASTE_RESOLVER_URL_ENVIRONMENT_VARIABLE } from "./resolution-provider.js";
15
15
  import { PI_VERSION, QLOO_HELP, runQloo } from "./router.js";
16
16
  import { QLOO_EXEC_EVENT_SCHEMA_VERSION, QLOO_EXEC_HELP, QLOO_EXEC_MAX_INPUT_BYTES, runQlooExec } from "./exec.js";
@@ -18,6 +18,7 @@ import { ensureQlooStateDirectories, resolveQlooPaths } from "./paths.js";
18
18
  import { createProjectContextTool, inspectProjectContext, QLOO_PROJECT_CONTEXT_SCHEMA_VERSION } from "./project-context.js";
19
19
  import { buildExploreResourceOptions, buildHarnessResourceOptions, applyQlooModelRetryPolicy, createPiHarnessRuntime, MissingModelAuthenticationError, PI_AGENT_DIR_ENVIRONMENT_VARIABLE, PI_OFFLINE_ENVIRONMENT_VARIABLE, PI_SKIP_VERSION_CHECK_ENVIRONMENT_VARIABLE, PI_TELEMETRY_ENVIRONMENT_VARIABLE, QLOO_MODEL_RETRY_POLICY, PiHarnessRuntime, requireAuthenticatedModel, withPiAgentDirectory, withPiPrivacyDefaults } from "./runtime/pi-adapter.js";
20
20
  import { buildExploreToolNames, buildProfileToolNames, createHarnessPolicyExtension, createExplorePolicyExtension, QLOO_SESSION_STATE_ENTRY_TYPE, QLOO_SESSION_STATE_SCHEMA_VERSION, QLOO_WORKSPACE_TOOL_NAMES, validateExploreTools } from "./runtime/explore-policy.js";
21
+ import { QLOO_RESOLUTION_CHOICE_ENTRY_TYPE, QLOO_RESOLUTION_CHOICE_SCHEMA_VERSION, QlooResolutionMemory, clearResolutionChoicesEvent, forgetResolutionChoiceEvent, rememberResolutionChoicesEvent } from "./runtime/resolution-memory.js";
21
22
  import { applyPiInteractiveCommandPolicy, BLOCKED_PI_INTERACTIVE_COMMANDS, isBlockedPiInteractiveCommand, PI_SHARE_BLOCK_MESSAGE, PI_TRUST_BLOCK_MESSAGE, PiCommandPolicyCompatibilityError, PINNED_PI_VERSION } from "./runtime/pi-command-policy.js";
22
23
  import { loadHarnessResources } from "./runtime/resources.js";
23
24
  import { findGuidedGoal, guidedGoalLabel, QLOO_GUIDED_GOALS, qlooNextActions } from "./guided-journey.js";
@@ -65,6 +66,8 @@ export {
65
66
  QLOO_PLAN_HELP,
66
67
  QLOO_PROFILE_DEFINITIONS,
67
68
  QLOO_PROJECT_CONTEXT_SCHEMA_VERSION,
69
+ QLOO_RESOLUTION_CHOICE_ENTRY_TYPE,
70
+ QLOO_RESOLUTION_CHOICE_SCHEMA_VERSION,
68
71
  QLOO_RESOLUTION_PROVIDER_ENVIRONMENT_VARIABLE,
69
72
  QLOO_SESSION_STATE_ENTRY_TYPE,
70
73
  QLOO_SESSION_STATE_SCHEMA_VERSION,
@@ -78,6 +81,7 @@ export {
78
81
  QLOO_UPDATE_SPEC_ENVIRONMENT_VARIABLE,
79
82
  QLOO_WORKSPACE_TOOL_NAMES,
80
83
  QlooIntegrationPlanError,
84
+ QlooResolutionMemory,
81
85
  QlooResolutionProviderError,
82
86
  QlooWorkflowExecutionError,
83
87
  TASTE_RESOLVER_API_KEY_ENVIRONMENT_VARIABLE,
@@ -89,6 +93,7 @@ export {
89
93
  buildExploreToolNames,
90
94
  buildHarnessResourceOptions,
91
95
  buildProfileToolNames,
96
+ clearResolutionChoicesEvent,
92
97
  createBuildHandoffPrompt,
93
98
  createCliQlooWorkflowExecutor,
94
99
  createDelegatingQlooWorkflowExecutor,
@@ -114,6 +119,7 @@ export {
114
119
  createTerminalSetupIO,
115
120
  ensureQlooStateDirectories,
116
121
  findGuidedGoal,
122
+ forgetResolutionChoiceEvent,
117
123
  formatDoctorReport,
118
124
  formatQlooResolutionCandidateLabels,
119
125
  formatQlooSetupReport,
@@ -133,10 +139,12 @@ export {
133
139
  parseQlooRawPage,
134
140
  probeTasteResolverHealth,
135
141
  qlooNextActions,
142
+ rememberResolutionChoicesEvent,
136
143
  renderQlooCallLines,
137
144
  renderQlooResultLines,
138
145
  requireAuthenticatedModel,
139
146
  resolutionCandidates,
147
+ resolutionInputContexts,
140
148
  resolveQlooPaths,
141
149
  runDoctor,
142
150
  runHarnessCli,
@@ -211,12 +211,12 @@ var QLOO_LIMIT_SCHEMA = Type.Optional(Type.Integer({
211
211
  var QLOO_ENTITY_INPUTS_SCHEMA = Type.Array(Type.String({ minLength: 1 }), {
212
212
  minItems: 1,
213
213
  maxItems: 10,
214
- description: "Entity names or Qloo entity UUIDs. Keep one combined taste profile in one call."
214
+ description: "Named entities or Qloo entity UUIDs; use tag fields for abstract concepts."
215
215
  });
216
216
  var QLOO_TAG_INPUTS_SCHEMA = Type.Array(Type.String({ minLength: 1 }), {
217
217
  minItems: 1,
218
218
  maxItems: 10,
219
- description: "Natural-language tag concepts or stable Qloo tag URNs."
219
+ description: "Genres, moods, styles, traits, or other concepts, or Qloo tag URNs; not named entities."
220
220
  });
221
221
  var QLOO_DEMOGRAPHIC_SCHEMA = Type.String({
222
222
  minLength: 1,
@@ -376,6 +376,7 @@ var QLOO_WORKFLOW_METADATA = {
376
376
  promptSnippet: "Recommend entities from a combined Qloo taste profile",
377
377
  promptGuidelines: [
378
378
  "Pass every related taste and audience signal together in one qloo_recommend call.",
379
+ "Put named things in signals; put genres, moods, styles, traits, and concepts such as quiet luxury in signal_tags; reuse returned Qloo UUIDs and tag URNs.",
379
380
  "Use signal_location for audience location and filter_location to constrain result geography.",
380
381
  "Include demographic and location in the same call when both describe the audience."
381
382
  ],
@@ -386,7 +387,10 @@ var QLOO_WORKFLOW_METADATA = {
386
387
  label: "Qloo rank",
387
388
  description: "Rank one supplied option set against one shared entity, location, demographic, and tag profile. Scores from separate calls are not comparable.",
388
389
  promptSnippet: "Rank a caller-supplied shortlist with Qloo",
389
- promptGuidelines: ["Pass every option in one qloo_rank call so scores remain comparable."],
390
+ promptGuidelines: [
391
+ "Pass every option in one qloo_rank call so scores remain comparable.",
392
+ "Put named things in entity fields and concepts in tag fields; reuse returned Qloo UUIDs and tag URNs."
393
+ ],
390
394
  documentation: ["https://docs.qloo.com/reference/insights-api-deep-dive"]
391
395
  },
392
396
  describe: {
package/dist/mcp.js CHANGED
@@ -209,12 +209,12 @@ var QLOO_LIMIT_SCHEMA = Type.Optional(Type.Integer({
209
209
  var QLOO_ENTITY_INPUTS_SCHEMA = Type.Array(Type.String({ minLength: 1 }), {
210
210
  minItems: 1,
211
211
  maxItems: 10,
212
- description: "Entity names or Qloo entity UUIDs. Keep one combined taste profile in one call."
212
+ description: "Named entities or Qloo entity UUIDs; use tag fields for abstract concepts."
213
213
  });
214
214
  var QLOO_TAG_INPUTS_SCHEMA = Type.Array(Type.String({ minLength: 1 }), {
215
215
  minItems: 1,
216
216
  maxItems: 10,
217
- description: "Natural-language tag concepts or stable Qloo tag URNs."
217
+ description: "Genres, moods, styles, traits, or other concepts, or Qloo tag URNs; not named entities."
218
218
  });
219
219
  var QLOO_DEMOGRAPHIC_SCHEMA = Type.String({
220
220
  minLength: 1,
@@ -374,6 +374,7 @@ var QLOO_WORKFLOW_METADATA = {
374
374
  promptSnippet: "Recommend entities from a combined Qloo taste profile",
375
375
  promptGuidelines: [
376
376
  "Pass every related taste and audience signal together in one qloo_recommend call.",
377
+ "Put named things in signals; put genres, moods, styles, traits, and concepts such as quiet luxury in signal_tags; reuse returned Qloo UUIDs and tag URNs.",
377
378
  "Use signal_location for audience location and filter_location to constrain result geography.",
378
379
  "Include demographic and location in the same call when both describe the audience."
379
380
  ],
@@ -384,7 +385,10 @@ var QLOO_WORKFLOW_METADATA = {
384
385
  label: "Qloo rank",
385
386
  description: "Rank one supplied option set against one shared entity, location, demographic, and tag profile. Scores from separate calls are not comparable.",
386
387
  promptSnippet: "Rank a caller-supplied shortlist with Qloo",
387
- promptGuidelines: ["Pass every option in one qloo_rank call so scores remain comparable."],
388
+ promptGuidelines: [
389
+ "Pass every option in one qloo_rank call so scores remain comparable.",
390
+ "Put named things in entity fields and concepts in tag fields; reuse returned Qloo UUIDs and tag URNs."
391
+ ],
388
392
  documentation: ["https://docs.qloo.com/reference/insights-api-deep-dive"]
389
393
  },
390
394
  describe: {