@kitman-sh/sdk 0.10.77 → 0.10.79

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.
@@ -4,7 +4,7 @@ import {
4
4
  KitDigest,
5
5
  AgentDeclaration,
6
6
  KitDeclarations
7
- } from "../chunk-g7x3s4x6.js";
7
+ } from "../chunk-r609bz8q.js";
8
8
  import {
9
9
  digestSha256,
10
10
  digestSha512,
@@ -13,7 +13,7 @@ import {
13
13
  RunnerRpcProtocolVersion,
14
14
  describeFlag2,
15
15
  Described2
16
- } from "../chunk-3qttynnn.js";
16
+ } from "../chunk-7tbysqtf.js";
17
17
 
18
18
  // packages/core/src/json.ts
19
19
  import * as Schema from "effect/Schema";
@@ -33,7 +33,7 @@ import {
33
33
  executeLoop2,
34
34
  LoopCheckError2,
35
35
  checkLoop2
36
- } from "./chunk-g7x3s4x6.js";
36
+ } from "./chunk-r609bz8q.js";
37
37
  // packages/core/src/agent-environment.ts
38
38
  import * as Schema from "effect/Schema";
39
39
  var AgentEnvironmentPolicy = Schema.Union([Schema.Literal("recommended"), Schema.Literal("required")]);
@@ -1057,6 +1057,8 @@ class RunnerCapabilityRpcs extends RpcGroup.make(Rpc.make("PutQuestion", {
1057
1057
  runnerChecks: Schema7.optionalKey(Schema7.Array(Schema7.String)),
1058
1058
  approved: Schema7.optionalKey(Schema7.String),
1059
1059
  repository: Schema7.optionalKey(Schema7.String),
1060
+ conflicts: Schema7.optionalKey(Schema7.Boolean),
1061
+ needsRebase: Schema7.optionalKey(Schema7.Boolean),
1060
1062
  target: Schema7.optionalKey(Schema7.Struct({
1061
1063
  branch: Schema7.String,
1062
1064
  head: Schema7.String,
@@ -1552,6 +1552,12 @@ var LoopSafeReferenceString = Schema12.String.check(Schema12.isMinLength(1), Sch
1552
1552
  var LoopSafeInternalReferenceString = Schema12.String.check(Schema12.isMinLength(1), Schema12.isMaxLength(240), Schema12.isPattern(new RegExp(LoopSafeInternalReferencePattern, "u")));
1553
1553
  var LoopSafeText = Schema12.String.check(Schema12.isMaxLength(4000), Schema12.isPattern(new RegExp(`^(?![\\s\\S]*(?:${LoopCredentialContentPattern}|[A-Za-z][A-Za-z0-9+.-]*://(?:[^\\s/?#]*@|[^\\s?#]*\\?)))[\\s\\S]*$`, "u")));
1554
1554
  var recommendedDefault = (recommended) => recommended !== undefined && Schema12.is(LoopSafeText)(recommended) ? recommended : undefined;
1555
+ var unansweredQuestionLead = "Nobody answers in full auto, and the agent's Question has no answer to take";
1556
+ var unansweredQuestionReason2 = (prompt) => {
1557
+ const reason = `${unansweredQuestionLead}: ${prompt}`.slice(0, 4000);
1558
+ return Schema12.is(LoopSafeText)(reason) ? reason : `${unansweredQuestionLead}; its text is on the Run`;
1559
+ };
1560
+ var isUnansweredQuestion2 = (reason) => reason.startsWith(unansweredQuestionLead);
1555
1561
  var QuestionText = Schema12.String;
1556
1562
  var LoopSafeOutputDataString = Schema12.String.check(Schema12.isMaxLength(4000), Schema12.isPattern(new RegExp(LoopSafeInternalReferencePattern, "u")));
1557
1563
  var LoopSafePackageName = Schema12.String.check(Schema12.isMinLength(1), Schema12.isMaxLength(200), Schema12.isPattern(new RegExp(LoopSafeReferencePattern, "u")));
@@ -3285,6 +3291,8 @@ var PipelineStatus2 = Schema19.Struct({
3285
3291
  runnerChecks: Schema19.optionalKey(Schema19.Array(Schema19.String)),
3286
3292
  approved: Schema19.optionalKey(Schema19.String),
3287
3293
  repository: Schema19.optionalKey(Schema19.String),
3294
+ conflicts: Schema19.optionalKey(Schema19.Boolean),
3295
+ needsRebase: Schema19.optionalKey(Schema19.Boolean),
3288
3296
  target: Schema19.optionalKey(Schema19.Struct({ branch: Schema19.String, head: Schema19.String, jobs: Schema19.Array(PipelineJob2) }))
3289
3297
  });
3290
3298
  var ReviewThread2 = Schema19.Struct({
@@ -4520,4 +4528,4 @@ var continuingBrief2 = (continuing) => [
4520
4528
  "The ChangeRequest's description lists what was left unsettled; settle those first."
4521
4529
  ].join(`
4522
4530
  `);
4523
- export { Numeric, isWholeNumber, guard, Id, Timestamp, canonicalJson, KitDigest, LoopCapabilities2, LoopManifest, AgentDeclaration, KitDeclarations, LoopOutcome2, capabilitiesOf2, defineLoop2, ManifestInvalid2, jsonSchemaOf2, loopManifest2, questionAdvice, EvidenceCheck2, VerifyResult2, OutcomeTable2, failsOn2, testsNotRunReasons2, evidenceGate2, StepFailed2, OutputInvalid2, QuestionRefused2, WaitTimedOut2, ChangeRequestClosed2, ChildFailed2, CapabilityDenied2, DuplicateStep2, InputInvalid2, LoopEvent2, LoopRun2, LoopHost2, agentDeferredNamed2, agentWorkDeferred2, syncDeferred2, answerDeferred2, childDeferred2, eventDeferred2, verifyDeferred2, takeStep2, launch2, agentWork2, agentWorkAs2, agentWorkOnce2, ask2, call2, waitFor2, verify2, suggestVerification2, PlanTicket2, PlanTickets2, BlockingCycle2, planWaves2, ChangeRequestRequest2, ChangeRequestResult2, WriteBackMilestones2, WriteBackRequest2, RunFile2, FileRequest2, ArtifactRequest2, ArtifactResult2, NoteRequest2, CreateTasksRequest2, CreateTasksResult2, AlertTaskRequest2, AlertTaskResult2, IntegrationBranchRequest2, IntegrationBranch2, MergeChangeRequestRequest2, MergeResult2, ApproveChangeRequestRequest2, ApproveChangeRequestResult2, CloseChangeRequestRequest2, CloseChangeRequestResult2, RerunPipelineRequest2, RerunPipelineResult2, ReportPipelineRequest2, ReportPipelineResult2, CommentRequest2, ReleaseRequest2, ReleaseResult2, ChangeRequestReadRequest2, PipelineJob2, PipelineStatus2, ReviewThread2, ReviewThreads2, OpenChangeRequestsRequest2, OpenChangeRequest2, OpenChangeRequests2, OwnChangeRequest2, OwnChangeRequests2, TranscriptPoint2, TranscriptsRequest2, TranscriptsResult2, ProposeRequest2, ProposeResult2, ProjectActivityRequest2, ProjectActivityResult2, DraftUpdateRequest2, DraftUpdateResult2, ChangeRequestActivity2, WriteBackActivity2, ArtifactActivity2, FileActivity2, NoteActivity2, CommentActivity2, CreateTasksActivity2, AlertTaskActivity2, IntegrationBranchActivity2, MergeChangeRequestActivity2, ReleaseActivity2, TranscriptsActivity2, ProposeActivity2, ProjectActivityActivity2, DraftUpdateActivity2, ChangeRequestReadActivity2, changeRequest2, writeBack2, artifact2, file2, note2, comment2, createTasks2, alertTask2, integrationBranch2, mergeChangeRequest2, approveChangeRequest2, closeChangeRequest2, pipelineMoved2, rerunPipeline2, reportPipeline2, release2, transcripts2, propose2, projectActivity2, pipelineStatus2, reviewThreads2, openChangeRequests2, ownChangeRequests2, draftUpdate2, ResourceName, ClaimResult2, claimDeferred2, letGoDeferred2, claim2, letGo2, WorkUnitRepoBinding, ProgramWorkUnit, CheckName2, ApprovedCheck, MeasurePlan2, WorkUnitClaimResult, WorkUnitClaimInput, WorkUnitHeartbeatInput, WorkUnitHeartbeatResult, WorkUnitReleaseInput, WorkUnitCompletion, MetricStats2, MeasureVerdict2, Measurement2, measureDeferred2, noiseFloor2, judgeMeasurement2, measure2, LoopJournal2, ScriptedFailure2, scriptedFailure2, loopWorkflow2, executeLoop2, testLoop2, Severity2, Finding2, MergedFinding2, Rebuttal2, RebuttalVerdict2, ScopeJudgement2, isBlocking2, mergeFindings2, splitDisputed2, settleRound2, rallyStop2, CheckFailed2, StepNamedTwice2, ReplayDiverged2, LoopCheckError2, checkLoop2, defineKit2, BaseSync2, syncBase2, Continuing2, continuingBrief2 };
4531
+ export { Numeric, isWholeNumber, guard, Id, Timestamp, canonicalJson, KitDigest, unansweredQuestionReason2, isUnansweredQuestion2, LoopCapabilities2, LoopManifest, AgentDeclaration, KitDeclarations, LoopOutcome2, capabilitiesOf2, defineLoop2, ManifestInvalid2, jsonSchemaOf2, loopManifest2, questionAdvice, EvidenceCheck2, VerifyResult2, OutcomeTable2, failsOn2, testsNotRunReasons2, evidenceGate2, StepFailed2, OutputInvalid2, QuestionRefused2, WaitTimedOut2, ChangeRequestClosed2, ChildFailed2, CapabilityDenied2, DuplicateStep2, InputInvalid2, LoopEvent2, LoopRun2, LoopHost2, agentDeferredNamed2, agentWorkDeferred2, syncDeferred2, answerDeferred2, childDeferred2, eventDeferred2, verifyDeferred2, takeStep2, launch2, agentWork2, agentWorkAs2, agentWorkOnce2, ask2, call2, waitFor2, verify2, suggestVerification2, PlanTicket2, PlanTickets2, BlockingCycle2, planWaves2, ChangeRequestRequest2, ChangeRequestResult2, WriteBackMilestones2, WriteBackRequest2, RunFile2, FileRequest2, ArtifactRequest2, ArtifactResult2, NoteRequest2, CreateTasksRequest2, CreateTasksResult2, AlertTaskRequest2, AlertTaskResult2, IntegrationBranchRequest2, IntegrationBranch2, MergeChangeRequestRequest2, MergeResult2, ApproveChangeRequestRequest2, ApproveChangeRequestResult2, CloseChangeRequestRequest2, CloseChangeRequestResult2, RerunPipelineRequest2, RerunPipelineResult2, ReportPipelineRequest2, ReportPipelineResult2, CommentRequest2, ReleaseRequest2, ReleaseResult2, ChangeRequestReadRequest2, PipelineJob2, PipelineStatus2, ReviewThread2, ReviewThreads2, OpenChangeRequestsRequest2, OpenChangeRequest2, OpenChangeRequests2, OwnChangeRequest2, OwnChangeRequests2, TranscriptPoint2, TranscriptsRequest2, TranscriptsResult2, ProposeRequest2, ProposeResult2, ProjectActivityRequest2, ProjectActivityResult2, DraftUpdateRequest2, DraftUpdateResult2, ChangeRequestActivity2, WriteBackActivity2, ArtifactActivity2, FileActivity2, NoteActivity2, CommentActivity2, CreateTasksActivity2, AlertTaskActivity2, IntegrationBranchActivity2, MergeChangeRequestActivity2, ReleaseActivity2, TranscriptsActivity2, ProposeActivity2, ProjectActivityActivity2, DraftUpdateActivity2, ChangeRequestReadActivity2, changeRequest2, writeBack2, artifact2, file2, note2, comment2, createTasks2, alertTask2, integrationBranch2, mergeChangeRequest2, approveChangeRequest2, closeChangeRequest2, pipelineMoved2, rerunPipeline2, reportPipeline2, release2, transcripts2, propose2, projectActivity2, pipelineStatus2, reviewThreads2, openChangeRequests2, ownChangeRequests2, draftUpdate2, ResourceName, ClaimResult2, claimDeferred2, letGoDeferred2, claim2, letGo2, WorkUnitRepoBinding, ProgramWorkUnit, CheckName2, ApprovedCheck, MeasurePlan2, WorkUnitClaimResult, WorkUnitClaimInput, WorkUnitHeartbeatInput, WorkUnitHeartbeatResult, WorkUnitReleaseInput, WorkUnitCompletion, MetricStats2, MeasureVerdict2, Measurement2, measureDeferred2, noiseFloor2, judgeMeasurement2, measure2, LoopJournal2, ScriptedFailure2, scriptedFailure2, loopWorkflow2, executeLoop2, testLoop2, Severity2, Finding2, MergedFinding2, Rebuttal2, RebuttalVerdict2, ScopeJudgement2, isBlocking2, mergeFindings2, splitDisputed2, settleRound2, rallyStop2, CheckFailed2, StepNamedTwice2, ReplayDiverged2, LoopCheckError2, checkLoop2, defineKit2, BaseSync2, syncBase2, Continuing2, continuingBrief2 };
@@ -1,5 +1,7 @@
1
1
  // @bun
2
2
  import {
3
+ unansweredQuestionReason2,
4
+ isUnansweredQuestion2,
3
5
  LoopCapabilities2,
4
6
  LoopOutcome2,
5
7
  capabilitiesOf2,
@@ -174,7 +176,7 @@ import {
174
176
  syncBase2,
175
177
  Continuing2,
176
178
  continuingBrief2
177
- } from "../chunk-g7x3s4x6.js";
179
+ } from "../chunk-r609bz8q.js";
178
180
  export {
179
181
  AlertTaskActivity2 as AlertTaskActivity,
180
182
  AlertTaskRequest2 as AlertTaskRequest,
@@ -311,6 +313,7 @@ export {
311
313
  file2 as file,
312
314
  integrationBranch2 as integrationBranch,
313
315
  isBlocking2 as isBlocking,
316
+ isUnansweredQuestion2 as isUnansweredQuestion,
314
317
  jsonSchemaOf2 as jsonSchemaOf,
315
318
  judgeMeasurement2 as judgeMeasurement,
316
319
  launch2 as launch,
@@ -346,6 +349,7 @@ export {
346
349
  testLoop2 as testLoop,
347
350
  testsNotRunReasons2 as testsNotRunReasons,
348
351
  transcripts2 as transcripts,
352
+ unansweredQuestionReason2 as unansweredQuestionReason,
349
353
  verify2 as verify,
350
354
  verifyDeferred2 as verifyDeferred,
351
355
  waitFor2 as waitFor,
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"../chunk-g7x3s4x6.js";
2
+ import"../chunk-r609bz8q.js";
3
3
  import {
4
4
  JournalWriteFailed2,
5
5
  refusedStep2,
@@ -17,7 +17,7 @@ import {
17
17
  networkGuard2,
18
18
  carriedKits2,
19
19
  runKit2
20
- } from "../chunk-3qttynnn.js";
20
+ } from "../chunk-7tbysqtf.js";
21
21
  export {
22
22
  Described2 as Described,
23
23
  JournalWriteFailed2 as JournalWriteFailed,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitman-sh/sdk",
3
- "version": "0.10.77",
3
+ "version": "0.10.79",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "exports": {
@@ -16,6 +16,10 @@ export declare const LoopSourceMode: Schema.Literals<readonly ["direct", "git_ba
16
16
  export declare const LoopCapabilityKind: Schema.Literals<readonly ["read_task", "read_repo_binding", "read_agent_environment", "read_kit", "update_task_status", "read_change_request", "read_change_request_review", "read_task_link", "refresh_change_request_metadata", "record_change_request_review", "record_session_update", "create_task_link", "create_task_dependency", "create_task_asset", "create_follow_up_task", "execute_agent", "read_step_attempt", "record_task_thread_entry", "write_provider_repository", "write_provider_change_request", "publish_provider_check", "write_provider_comment", "request_provider_changes", "approve_provider_change_request", "merge_provider_change_request", "wait_for_event", "request_human_approval", "execute_package_ref", "read_context_feedback", "read_session_update", "read_repo_binding", "read_agent_environment", "read_kit", "read_memory", "read_decision", "create_task_dependency", "propose_memory", "propose_kit", "propose_decision", "propose_agent_environment_policy", "propose_team_context", "propose_context_relevance", "execute_runner_sandbox"]>;
17
17
  /** A Question's recommendation as its default, when it can be stored as one: a default must be LoopSafeText. */
18
18
  export declare const recommendedDefault: (recommended: string | undefined) => string | undefined;
19
+ /** Why an agent Step ended on a Question in full auto that has neither a default nor a recommendation to take. */
20
+ export declare const unansweredQuestionReason: (prompt: string) => string;
21
+ /** Whether a Step failed because its agent asked a Question in full auto that nothing could answer. */
22
+ export declare const isUnansweredQuestion: (reason: string) => boolean;
19
23
  export declare const LoopDataSchemaRef: Schema.Struct<{
20
24
  readonly kind: Schema.Literal<"typebox_ref">;
21
25
  readonly name: Schema.String;
@@ -1731,6 +1731,8 @@ export declare const makeProgramRpcClient: (options: ConnectionOptions) => Effec
1731
1731
  readonly runnerChecks?: readonly string[];
1732
1732
  readonly approved?: string;
1733
1733
  readonly repository?: string;
1734
+ readonly conflicts?: boolean;
1735
+ readonly needsRebase?: boolean;
1734
1736
  readonly target?: {
1735
1737
  readonly branch: string;
1736
1738
  readonly head: string;
@@ -1755,6 +1757,8 @@ export declare const makeProgramRpcClient: (options: ConnectionOptions) => Effec
1755
1757
  readonly runnerChecks?: readonly string[];
1756
1758
  readonly approved?: string;
1757
1759
  readonly repository?: string;
1760
+ readonly conflicts?: boolean;
1761
+ readonly needsRebase?: boolean;
1758
1762
  readonly target?: {
1759
1763
  readonly branch: string;
1760
1764
  readonly head: string;
@@ -1043,6 +1043,8 @@ declare const RunnerCapabilityRpcs_base: RpcGroup.RpcGroup<Rpc.Rpc<"AdmitChild",
1043
1043
  readonly runnerChecks: Schema.optionalKey<Schema.$Array<Schema.String>>;
1044
1044
  readonly approved: Schema.optionalKey<Schema.String>;
1045
1045
  readonly repository: Schema.optionalKey<Schema.String>;
1046
+ readonly conflicts: Schema.optionalKey<Schema.Boolean>;
1047
+ readonly needsRebase: Schema.optionalKey<Schema.Boolean>;
1046
1048
  readonly target: Schema.optionalKey<Schema.Struct<{
1047
1049
  readonly branch: Schema.String;
1048
1050
  readonly head: Schema.String;
@@ -1873,6 +1875,8 @@ export declare const ProgramRpcs: RpcGroup.RpcGroup<Rpc.Rpc<"AdmitChild", Schema
1873
1875
  readonly runnerChecks: Schema.optionalKey<Schema.$Array<Schema.String>>;
1874
1876
  readonly approved: Schema.optionalKey<Schema.String>;
1875
1877
  readonly repository: Schema.optionalKey<Schema.String>;
1878
+ readonly conflicts: Schema.optionalKey<Schema.Boolean>;
1879
+ readonly needsRebase: Schema.optionalKey<Schema.Boolean>;
1876
1880
  readonly target: Schema.optionalKey<Schema.Struct<{
1877
1881
  readonly branch: Schema.String;
1878
1882
  readonly head: Schema.String;
@@ -3115,6 +3119,8 @@ export declare const RunnerRpcs: RpcGroup.RpcGroup<Rpc.Rpc<"AdmitChild", Schema.
3115
3119
  readonly runnerChecks: Schema.optionalKey<Schema.$Array<Schema.String>>;
3116
3120
  readonly approved: Schema.optionalKey<Schema.String>;
3117
3121
  readonly repository: Schema.optionalKey<Schema.String>;
3122
+ readonly conflicts: Schema.optionalKey<Schema.Boolean>;
3123
+ readonly needsRebase: Schema.optionalKey<Schema.Boolean>;
3118
3124
  readonly target: Schema.optionalKey<Schema.Struct<{
3119
3125
  readonly branch: Schema.String;
3120
3126
  readonly head: Schema.String;
@@ -265,9 +265,13 @@ export declare const PipelineStatus: Schema.Struct<{
265
265
  readonly approved: Schema.optionalKey<Schema.String>;
266
266
  /** The ChangeRequest's RepoBinding. */
267
267
  readonly repository: Schema.optionalKey<Schema.String>;
268
+ /** The forge says the ChangeRequest conflicts with its target; left out while it has not worked that out. */
269
+ readonly conflicts: Schema.optionalKey<Schema.Boolean>;
270
+ /** The forge says the branch must take its target in before it can merge, as a semi-linear project does. */
271
+ readonly needsRebase: Schema.optionalKey<Schema.Boolean>;
268
272
  /**
269
- * While the pipeline fails: the head of the ChangeRequest's target branch and the forge's checks on it, none where
270
- * the forge runs no pipeline. Left out when the forge could not say.
273
+ * While the pipeline fails, or the forge says the ChangeRequest conflicts or needs rebase: the head of its target
274
+ * branch and the forge's checks on it, none where the forge runs no pipeline. Left out when the forge could not say.
271
275
  */
272
276
  readonly target: Schema.optionalKey<Schema.Struct<{
273
277
  readonly branch: Schema.String;
@@ -750,6 +754,8 @@ export declare const pipelineStatus: (name: string, request: typeof ChangeReques
750
754
  readonly runnerChecks?: readonly string[];
751
755
  readonly approved?: string;
752
756
  readonly repository?: string;
757
+ readonly conflicts?: boolean;
758
+ readonly needsRebase?: boolean;
753
759
  readonly target?: {
754
760
  readonly branch: string;
755
761
  readonly head: string;
@@ -13,3 +13,4 @@ export * from './measure';
13
13
  export * from './claims';
14
14
  /** What a verification is called, as a Loop's Output names one. */
15
15
  export { CheckName } from '../../../core/src/work-unit';
16
+ export { isUnansweredQuestion, unansweredQuestionReason } from '../../../core/src/loop';