@garygentry/system1 0.4.0 → 0.5.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.
@@ -0,0 +1,46 @@
1
+ import { createRequire as __decideRequire } from "node:module"; const require = __decideRequire(import.meta.url);
2
+
3
+ // src/exit-codes.ts
4
+ var EXIT = {
5
+ ok: 0,
6
+ failure: 1,
7
+ usage: 2,
8
+ egressRefused: 3,
9
+ budgetGuard: 4,
10
+ providerError: 5,
11
+ replayMiss: 6,
12
+ /**
13
+ * The check ran and did not pass: `spec check --strict` (an example missed),
14
+ * or `spec lint` (an error-level finding or invalid spec; with `--strict`, any
15
+ * warning).
16
+ */
17
+ checkFailed: 7
18
+ };
19
+ var BY_CODE = {
20
+ "invalid-request": EXIT.usage,
21
+ "state-too-large": EXIT.usage,
22
+ "unknown-model": EXIT.usage,
23
+ "config-error": EXIT.usage,
24
+ "source-error": EXIT.usage,
25
+ "no-key": EXIT.usage,
26
+ "egress-refused": EXIT.egressRefused,
27
+ "budget-exceeded": EXIT.budgetGuard,
28
+ "provider-unreachable": EXIT.providerError,
29
+ "provider-http": EXIT.providerError,
30
+ "malformed-response": EXIT.providerError,
31
+ "replay-miss": EXIT.replayMiss
32
+ };
33
+ function exitFor(code) {
34
+ return code === "error" ? EXIT.failure : BY_CODE[code];
35
+ }
36
+
37
+ // ../core/dist/version.js
38
+ var VERSION = "0.5.0";
39
+ var CLI_PACKAGE = "@garygentry/system1";
40
+
41
+ export {
42
+ VERSION,
43
+ CLI_PACKAGE,
44
+ EXIT,
45
+ exitFor
46
+ };
@@ -0,0 +1,73 @@
1
+ import { createRequire as __decideRequire } from "node:module"; const require = __decideRequire(import.meta.url);
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
+ }) : x)(function(x) {
11
+ if (typeof require !== "undefined") return require.apply(this, arguments);
12
+ throw Error('Dynamic require of "' + x + '" is not supported');
13
+ });
14
+ var __commonJS = (cb, mod) => function __require2() {
15
+ try {
16
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
+ } catch (e) {
18
+ throw mod = 0, e;
19
+ }
20
+ };
21
+ var __export = (target, all) => {
22
+ for (var name in all)
23
+ __defProp(target, name, { get: all[name], enumerable: true });
24
+ };
25
+ var __copyProps = (to, from, except, desc) => {
26
+ if (from && typeof from === "object" || typeof from === "function") {
27
+ for (let key of __getOwnPropNames(from))
28
+ if (!__hasOwnProp.call(to, key) && key !== except)
29
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
30
+ }
31
+ return to;
32
+ };
33
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
34
+ // If the importer is in node compatibility mode or this is not an ESM
35
+ // file that has been converted to a CommonJS file using a Babel-
36
+ // compatible transform (i.e. "__esModule" has not been set), then set
37
+ // "default" to the CommonJS "module.exports" for node compatibility.
38
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
39
+ mod
40
+ ));
41
+
42
+ // ../core/dist/errors.js
43
+ var DecisionsError = class extends Error {
44
+ code;
45
+ details;
46
+ constructor(code, message, details = {}) {
47
+ super(message);
48
+ this.code = code;
49
+ this.details = details;
50
+ this.name = "DecisionsError";
51
+ }
52
+ };
53
+ var ProviderError = class extends DecisionsError {
54
+ status;
55
+ constructor(code, message, status) {
56
+ super(code, message, status === void 0 ? {} : { status });
57
+ this.status = status;
58
+ this.name = "ProviderError";
59
+ }
60
+ };
61
+ function isDecisionsError(error) {
62
+ return error instanceof DecisionsError;
63
+ }
64
+
65
+ export {
66
+ __require,
67
+ __commonJS,
68
+ __export,
69
+ __toESM,
70
+ DecisionsError,
71
+ ProviderError,
72
+ isDecisionsError
73
+ };
@@ -2,10 +2,10 @@ import { createRequire as __decideRequire } from "node:module"; const require =
2
2
  import {
3
3
  parseFileRef,
4
4
  parseQuestionSet
5
- } from "./chunk-QYUSJUFX.mjs";
5
+ } from "./chunk-TMAJXDTE.mjs";
6
6
  import {
7
7
  DecisionsError
8
- } from "./chunk-WZIVOY5Q.mjs";
8
+ } from "./chunk-MH6THLCO.mjs";
9
9
 
10
10
  // src/args.ts
11
11
  import { readFileSync } from "node:fs";