@kitman-sh/go-to-market 0.52.0 → 0.54.0

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/bundle.js CHANGED
@@ -15064,6 +15064,15 @@ var QuestionAnswer = Struct({
15064
15064
  answeredAt: Timestamp,
15065
15065
  idempotencyKey: String5.check(isMinLength(1), isMaxLength(240))
15066
15066
  });
15067
+ var QuestionSplitEntry = Struct({
15068
+ title: String5.check(isMinLength(1), isMaxLength(240)),
15069
+ promise: QuestionText,
15070
+ criteria: ArraySchema(QuestionText).check(isMinLength(1))
15071
+ });
15072
+ var QuestionSplit = Struct({
15073
+ taskId: Id,
15074
+ entries: ArraySchema(QuestionSplitEntry).check(isMinLength(1))
15075
+ });
15067
15076
  var Question = Struct({
15068
15077
  id: Id,
15069
15078
  workspaceId: Id,
@@ -15081,6 +15090,7 @@ var Question = Struct({
15081
15090
  recommended: optionalKey2(QuestionText),
15082
15091
  recommendationReason: optionalKey2(QuestionText),
15083
15092
  informationOnly: optionalKey2(Boolean3),
15093
+ split: optionalKey2(QuestionSplit),
15084
15094
  default: optionalKey2(LoopSafeText),
15085
15095
  defaultAt: optionalKey2(Timestamp),
15086
15096
  responderPolicy: QuestionResponderPolicy,
@@ -15507,6 +15517,13 @@ var resolvedLocalDateTimes = new Map;
15507
15517
  var eventWhenClauseName = (event) => event.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
15508
15518
 
15509
15519
  // ../../packages/core/src/kit-declarations.ts
15520
+ var LoopIntent = Union2([
15521
+ Literal2("task"),
15522
+ Struct({
15523
+ goal: String5.check(makeFilter2((goal) => goal.trim() !== "" || "a non-blank goal")),
15524
+ doneWhen: ArraySchema(String5)
15525
+ })
15526
+ ]);
15510
15527
  var LoopCapabilities = [
15511
15528
  "agent_work",
15512
15529
  "ask",
@@ -15566,6 +15583,7 @@ var LoopManifest = Struct({
15566
15583
  secrets: optionalKey2(ArraySchema(SecretName2)),
15567
15584
  network: optionalKey2(AgentSandboxNetwork),
15568
15585
  schedule: optionalKey2(Struct({ rule: ScheduleRule, timezone: String5 })),
15586
+ intent: optionalKey2(LoopIntent),
15569
15587
  outline: optionalKey2(LoopOutline)
15570
15588
  });
15571
15589
  var ProgramLoopListing = Struct({ ...ProgramLoop.fields, schedule: LoopManifest.fields.schedule });
@@ -15867,6 +15885,21 @@ var carriesRole = (loop, role, declared) => gen2(function* () {
15867
15885
  });
15868
15886
  }
15869
15887
  });
15888
+ var IntentDeclaration = Union2([
15889
+ Literal2("task"),
15890
+ Struct({ goal: String5, doneWhen: optionalKey2(ArraySchema(String5)) })
15891
+ ]);
15892
+ var declaredIntent = (definition) => gen2(function* () {
15893
+ if (definition.intent === undefined)
15894
+ return { goal: `Run the ${definition.id} Loop`, doneWhen: [] };
15895
+ const invalid = (reason) => new ManifestInvalid({ loop: definition.id, message: `Loop "${definition.id}": ${reason}` });
15896
+ const declared = yield* decodeEffect2(IntentDeclaration)(definition.intent).pipe(mapError3((error) => invalid(`intent must be 'task' or a goal with a list of strings: ${error.message}`)));
15897
+ if (declared === "task")
15898
+ return declared;
15899
+ if (declared.goal.trim() === "")
15900
+ return yield* invalid("intent goal must not be blank");
15901
+ return { goal: declared.goal.trim(), doneWhen: [...declared.doneWhen ?? []] };
15902
+ });
15870
15903
  var loopManifest = (definition) => gen2(function* () {
15871
15904
  yield* declarationsAreData(definition);
15872
15905
  if (definition.version !== undefined && !is2(LoopVersion)(definition.version))
@@ -15879,6 +15912,7 @@ var loopManifest = (definition) => gen2(function* () {
15879
15912
  loop: definition.id,
15880
15913
  message: "description must be one line of 1 to 160 characters"
15881
15914
  });
15915
+ const intent = yield* declaredIntent(definition);
15882
15916
  const input = yield* jsonSchemaOf(definition.id, definition.input);
15883
15917
  const output = yield* jsonSchemaOf(definition.id, definition.output);
15884
15918
  if (definition.role !== undefined)
@@ -15892,6 +15926,7 @@ var loopManifest = (definition) => gen2(function* () {
15892
15926
  output,
15893
15927
  ...definition.outcome === undefined ? undefined : { outcome: definition.outcome },
15894
15928
  ...definition.role === undefined ? undefined : { role: definition.role },
15929
+ intent,
15895
15930
  agents: definition.agents,
15896
15931
  checkout: definition.checkout,
15897
15932
  when: yield* namedWhenClauses(definition.id, definition.when ?? []),
@@ -23018,7 +23053,9 @@ var scriptedHost = (script, engine, agentLaunches, childLaunches, waits, verifyL
23018
23053
  return andThen2(sync2(() => questions.push({
23019
23054
  step: launch.step,
23020
23055
  prompt: launch.prompt,
23021
- ...launch.answerSchema === undefined ? undefined : { answerSchema: launch.answerSchema }
23056
+ ...launch.answerSchema === undefined ? undefined : { answerSchema: launch.answerSchema },
23057
+ ...launch.default === undefined ? undefined : { default: launch.default },
23058
+ ...launch.unattendedAuto === undefined ? undefined : { unattendedAuto: launch.unattendedAuto }
23022
23059
  })), answer === undefined ? resolve(answerDeferred(launch.step), launch.token, fail5(new StepFailed({ step: launch.step, reason: "no answer was scripted" }))) : launch.answerSchema === undefined ? resolve(answerDeferred(launch.step), launch.token, succeed4(answer)) : resolve(structuredAnswerDeferred(launch.step), launch.token, succeed4({
23023
23060
  answer,
23024
23061
  by: scripted !== undefined ? "person" : auto !== undefined ? "auto" : "default"
@@ -28883,4 +28920,4 @@ var runKit = (config, identity, packages) => {
28883
28920
  runMain2(program.pipe(flatMap3((code) => sync2(() => process.exit(code)))));
28884
28921
  };
28885
28922
  // .kitman-build-entry.ts
28886
- runKit(kitman_config_default, { name: "@kitman-sh/go-to-market", version: "0.52.0" }, []);
28923
+ runKit(kitman_config_default, { name: "@kitman-sh/go-to-market", version: "0.54.0" }, []);
@@ -4,7 +4,7 @@
4
4
  "carried": [
5
5
  {
6
6
  "name": "@kitman-sh/go-to-market",
7
- "version": "0.52.0",
7
+ "version": "0.54.0",
8
8
  "setup": "0270b1c80a2c382c905693fede77fcb29c404d97404546c95d45de274fa6b087",
9
9
  "loops": [],
10
10
  "agents": []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitman-sh/go-to-market",
3
- "version": "0.52.0",
3
+ "version": "0.54.0",
4
4
  "description": "Copywriting, marketing psychology and SEO audits.",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -15,11 +15,11 @@
15
15
  "LICENSE.md"
16
16
  ],
17
17
  "dependencies": {
18
- "@kitman-sh/sdk": "0.52.0"
18
+ "@kitman-sh/sdk": "0.54.0"
19
19
  },
20
20
  "kitman": {
21
21
  "bundle": "dist/bundle.js",
22
- "digest": "be2a703bfa25180319ed425062be910e622b9d9bee992934a2d9e8b8b3e482fd",
22
+ "digest": "f7b28a9be1904930cc579fc5aebef1745ada480c15919396872353c5d54683c4",
23
23
  "protocolVersion": 5,
24
24
  "declarations": "dist/declarations.json",
25
25
  "setup": {