@vornrun/connector-sdk 0.5.6 → 0.5.7

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.
@@ -578,6 +578,11 @@ function connectorManifest(connector) {
578
578
  type: trigger.type,
579
579
  label: trigger.label,
580
580
  ...trigger.description !== void 0 && { description: trigger.description },
581
+ // Carried through so the app can seed a connection's status mapping and
582
+ // its polling workflow. Absent when the connector said nothing, which is
583
+ // different from saying there is nothing.
584
+ ...trigger.statusMapping !== void 0 && { statusMapping: trigger.statusMapping },
585
+ ...trigger.defaultWorkflow !== void 0 && { defaultWorkflow: trigger.defaultWorkflow },
581
586
  setup: connectionSetup(connector, trigger.type)
582
587
  })),
583
588
  actions: connector.actions.map((action) => ({
package/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  resolveConfig,
8
8
  runPoll,
9
9
  serveConnector
10
- } from "./chunk-W4GGTEUK.js";
10
+ } from "./chunk-VBE6WCLN.js";
11
11
 
12
12
  // src/cli.ts
13
13
  import { pathToFileURL } from "url";
package/dist/index.d.ts CHANGED
@@ -106,11 +106,39 @@ interface FetchContext {
106
106
  /** Injectable clock so tests are deterministic. */
107
107
  now(): string;
108
108
  }
109
+ /**
110
+ * What an upstream state should become when an item is imported as a task.
111
+ *
112
+ * A suggestion, not a rule: it seeds the connection form, and the person
113
+ * setting it up can change it. Without any, everything a connector imports
114
+ * lands as `todo` regardless of whether it was closed a year ago.
115
+ */
116
+ interface StatusSuggestion {
117
+ /** The value the connector reports in `ConnectorItem.status`. */
118
+ upstream: string;
119
+ suggestedLocal: 'todo' | 'in_progress' | 'in_review' | 'done' | 'cancelled';
120
+ }
121
+ /**
122
+ * The workflow to create when a connection is made.
123
+ *
124
+ * A connector that fires on a schedule is useless until something polls it, and
125
+ * expecting every person to build that workflow by hand is how a connection
126
+ * ends up configured and silent. Seeded workflows are ordinary, visible and
127
+ * editable — the schedule is a starting point, not a fixed rule.
128
+ */
129
+ interface DefaultWorkflow {
130
+ name: string;
131
+ defaultCronFromMinutes: number;
132
+ }
109
133
  interface TriggerBase {
110
134
  /** Event key, e.g. `workItemCreated`. Becomes the `poll_<type>` MCP tool. */
111
135
  type: string;
112
136
  label: string;
113
137
  description?: string;
138
+ /** Seeds the connection's status mapping; the person setting it up owns it. */
139
+ statusMapping?: StatusSuggestion[];
140
+ /** Seeds a polling workflow when a connection is created. */
141
+ defaultWorkflow?: DefaultWorkflow;
114
142
  /**
115
143
  * Representative items. `vorn-connector check` replays these through the
116
144
  * real dedupe pipeline, so a connector can be verified before anyone has
@@ -365,6 +393,10 @@ interface ConnectorManifest {
365
393
  type: string;
366
394
  label: string;
367
395
  description?: string;
396
+ /** Seeds a connection's status mapping; absent when the connector was silent. */
397
+ statusMapping?: StatusSuggestion[];
398
+ /** Seeds the polling workflow created with the connection. */
399
+ defaultWorkflow?: DefaultWorkflow;
368
400
  setup: ConnectionSetup;
369
401
  }>;
370
402
  actions: Array<{
@@ -423,4 +455,4 @@ interface ConnectorHarness {
423
455
  */
424
456
  declare function createConnectorHarness(connector: Connector, harnessOptions?: HarnessOptions): ConnectorHarness;
425
457
 
426
- export { type ActionContext, type ActionDefinition, type ActionInputField, type CheckFinding, type CheckOptions, type ConnectionSetup, type Connector, type ConnectorConfig, type ConnectorConfigField, type ConnectorDefinition, type ConnectorHarness, type ConnectorIcon, type ConnectorItem, type ConnectorManifest, type ConnectorServerOptions, type DedupeStrategy, type FetchContext, type HarnessOptions, MANIFEST_TOOL, MAX_POLL_PAGES, type NormalizedItem, type PollContext, type PollOutcome, type PollPage, type RunActionOptions, type RunPollOptions, type TriggerDefinition, checkConnector, connectionSetup, connectorManifest, createConnectorHarness, createConnectorServer, defineConnector, drainPoll, envNameFor, formatFindings, normalizeItem, normalizeItems, pollToolName, pollWithDedupe, resolveConfig, runAction, runPoll, serveConnector };
458
+ export { type ActionContext, type ActionDefinition, type ActionInputField, type CheckFinding, type CheckOptions, type ConnectionSetup, type Connector, type ConnectorConfig, type ConnectorConfigField, type ConnectorDefinition, type ConnectorHarness, type ConnectorIcon, type ConnectorItem, type ConnectorManifest, type ConnectorServerOptions, type DedupeStrategy, type DefaultWorkflow, type FetchContext, type HarnessOptions, MANIFEST_TOOL, MAX_POLL_PAGES, type NormalizedItem, type PollContext, type PollOutcome, type PollPage, type RunActionOptions, type RunPollOptions, type StatusSuggestion, type TriggerDefinition, checkConnector, connectionSetup, connectorManifest, createConnectorHarness, createConnectorServer, defineConnector, drainPoll, envNameFor, formatFindings, normalizeItem, normalizeItems, pollToolName, pollWithDedupe, resolveConfig, runAction, runPoll, serveConnector };
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  runAction,
18
18
  runPoll,
19
19
  serveConnector
20
- } from "./chunk-W4GGTEUK.js";
20
+ } from "./chunk-VBE6WCLN.js";
21
21
 
22
22
  // src/harness.ts
23
23
  function createConnectorHarness(connector, harnessOptions = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vornrun/connector-sdk",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "Build and share Vorn pull connectors as ordinary npm packages",
5
5
  "type": "module",
6
6
  "license": "MIT",