@noodleseed/one 0.192.0 → 0.192.1

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.
@@ -3,7 +3,7 @@ import { type ToolAuthorizationCaller } from '@noodle-borg/protocol';
3
3
  import { type SurfaceCapabilityRef } from './artifact-projection.js';
4
4
  /** Model-context budget for the embedded assistant's compact product workflow projection. */
5
5
  export declare const ASSISTANT_GUIDE_MAX_BYTES: number;
6
- export type AssistantGuideUnavailableReason = 'package_unavailable' | 'no_complete_workflow';
6
+ export type AssistantGuideUnavailableReason = 'package_unavailable';
7
7
  /**
8
8
  * What a guide over {@link ASSISTANT_GUIDE_MAX_BYTES} gave up to fit. Size never removes the guide:
9
9
  * purpose, use cases, boundaries, and one index line per workflow always survive, so a business with
@@ -88,6 +88,8 @@ export declare function assistantModelToolOncePerSession(tool: ArtifactTool): bo
88
88
  /**
89
89
  * Build bounded product guidance from structured App Package data, never from rendered host files.
90
90
  * Workflows are atomic: if one step is unavailable to this model, the entire workflow is omitted.
91
+ * When none survives (an anonymous visitor, a tool-less turn), the guide still carries purpose, use
92
+ * cases, and boundaries: they must be safe for every audience, so the caller's identity never removes them.
91
93
  *
92
94
  * Over budget, detail is shed in one fixed order until the guide fits: first every example, then each
93
95
  * workflow's intent and steps, last authored workflow first, leaving its index line (id, title, when to
@@ -125,6 +125,8 @@ function normalizeVisibilityText(value) {
125
125
  /**
126
126
  * Build bounded product guidance from structured App Package data, never from rendered host files.
127
127
  * Workflows are atomic: if one step is unavailable to this model, the entire workflow is omitted.
128
+ * When none survives (an anonymous visitor, a tool-less turn), the guide still carries purpose, use
129
+ * cases, and boundaries: they must be safe for every audience, so the caller's identity never removes them.
128
130
  *
129
131
  * Over budget, detail is shed in one fixed order until the guide fits: first every example, then each
130
132
  * workflow's intent and steps, last authored workflow first, leaving its index line (id, title, when to
@@ -133,14 +135,12 @@ function normalizeVisibilityText(value) {
133
135
  export function projectAssistantGuide(input) {
134
136
  const parsed = appPackageArtifactV1Schema.safeParse(input.appPackage);
135
137
  if (!parsed.success)
136
- return unavailable('package_unavailable');
138
+ return { status: 'unavailable', reason: 'package_unavailable' };
137
139
  const projected = projectAppPackageCapabilities(parsed.data, {
138
140
  tools: input.modelTools.map((tool) => tool.name),
139
141
  resources: [],
140
142
  prompts: [],
141
- });
142
- if (projected === undefined)
143
- return unavailable('no_complete_workflow');
143
+ }) ?? { ...parsed.data, skill: { ...parsed.data.skill, workflows: [], examples: [] } };
144
144
  const workflows = projected.skill.workflows;
145
145
  const workflowIds = workflows.map((workflow) => workflow.id);
146
146
  let content = renderGuide(projected, { examples: true, indexOnly: [] });
@@ -179,7 +179,9 @@ function renderGuide(appPackage, shed) {
179
179
  `Product purpose: ${oneLine(skill.description)}`,
180
180
  'Use when:',
181
181
  ...skill.useWhen.map((value) => `- ${oneLine(value)}`),
182
- 'Workflows:',
182
+ ...(workflows.length === 0
183
+ ? ['No product workflows are available in this conversation.']
184
+ : ['Workflows:']),
183
185
  ];
184
186
  for (const workflow of workflows) {
185
187
  if (indexOnly.has(workflow.id)) {
@@ -252,7 +254,4 @@ function behaviorFacts(behavior) {
252
254
  function oneLine(value) {
253
255
  return value.replace(/\s+/g, ' ').trim();
254
256
  }
255
- function unavailable(reason) {
256
- return { status: 'unavailable', reason };
257
- }
258
257
  //# sourceMappingURL=assistant-guide.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noodleseed/one",
3
- "version": "0.192.0",
3
+ "version": "0.192.1",
4
4
  "private": false,
5
5
  "description": "Noodle CLI by Noodle Seed — author, run, and deploy declarative MCP servers. Embedding the assistant in your own web app is @noodleseed/assistant.",
6
6
  "license": "Apache-2.0",