@integrity-labs/agt-cli 0.28.1032 → 0.28.1034

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.
Files changed (25) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-OGITTSBM.js → chunk-6AEWTLG7.js} +4 -4
  3. package/dist/{chunk-NCIGLRCL.js → chunk-H54FYWAK.js} +34 -5
  4. package/dist/chunk-H54FYWAK.js.map +1 -0
  5. package/dist/{chunk-GLOCISGD.js → chunk-V74YKGXU.js} +2 -2
  6. package/dist/{claude-pair-runtime-KQDXWMWB.js → claude-pair-runtime-I4XYDZWO.js} +2 -2
  7. package/dist/lib/manager-worker.js +19 -15
  8. package/dist/lib/manager-worker.js.map +1 -1
  9. package/dist/mcp/direct-chat-channel.js +11 -1
  10. package/dist/mcp/index.js +11 -1
  11. package/dist/mcp/origami.js +11 -1
  12. package/dist/mcp/slack-channel.js +11 -1
  13. package/dist/mcp/telegram-channel.js +11 -1
  14. package/dist/mcp/xero.js +20 -9
  15. package/dist/{persistent-session-TOIMQIAU.js → persistent-session-MUY7PVLJ.js} +3 -3
  16. package/dist/{responsiveness-probe-VJOXOK66.js → responsiveness-probe-MPL5PM33.js} +3 -3
  17. package/dist/{session-auth-dead-T5EZNDRO.js → session-auth-dead-5ECPRU2V.js} +2 -2
  18. package/package.json +1 -1
  19. package/dist/chunk-NCIGLRCL.js.map +0 -1
  20. /package/dist/{chunk-OGITTSBM.js.map → chunk-6AEWTLG7.js.map} +0 -0
  21. /package/dist/{chunk-GLOCISGD.js.map → chunk-V74YKGXU.js.map} +0 -0
  22. /package/dist/{claude-pair-runtime-KQDXWMWB.js.map → claude-pair-runtime-I4XYDZWO.js.map} +0 -0
  23. /package/dist/{persistent-session-TOIMQIAU.js.map → persistent-session-MUY7PVLJ.js.map} +0 -0
  24. /package/dist/{responsiveness-probe-VJOXOK66.js.map → responsiveness-probe-MPL5PM33.js.map} +0 -0
  25. /package/dist/{session-auth-dead-T5EZNDRO.js.map → session-auth-dead-5ECPRU2V.js.map} +0 -0
package/dist/bin/agt.js CHANGED
@@ -40,12 +40,12 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-OGITTSBM.js";
43
+ } from "../chunk-6AEWTLG7.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
47
47
  readDirectChatSessionState
48
- } from "../chunk-GLOCISGD.js";
48
+ } from "../chunk-V74YKGXU.js";
49
49
  import {
50
50
  AnchorSessionClient,
51
51
  CHANNEL_REGISTRY,
@@ -79,7 +79,7 @@ import {
79
79
  serializeManifestForSlackCli,
80
80
  sessionFileExists,
81
81
  sessionTranscriptDir
82
- } from "../chunk-NCIGLRCL.js";
82
+ } from "../chunk-H54FYWAK.js";
83
83
  import "../chunk-TQDIIS3X.js";
84
84
  import "../chunk-XWVM4KPK.js";
85
85
  import "../chunk-EL5MWGGH.js";
@@ -5474,7 +5474,7 @@ import { execFileSync, execSync } from "child_process";
5474
5474
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5475
5475
  import chalk18 from "chalk";
5476
5476
  import ora16 from "ora";
5477
- var cliVersion = true ? "0.28.1032" : "dev";
5477
+ var cliVersion = true ? "0.28.1034" : "dev";
5478
5478
  async function fetchLatestVersion() {
5479
5479
  const host2 = getHost();
5480
5480
  if (!host2) return null;
@@ -6734,7 +6734,7 @@ function handleError(err) {
6734
6734
  }
6735
6735
 
6736
6736
  // src/bin/agt.ts
6737
- var cliVersion2 = true ? "0.28.1032" : "dev";
6737
+ var cliVersion2 = true ? "0.28.1034" : "dev";
6738
6738
  var program = new Command();
6739
6739
  program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
6740
6740
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -15,7 +15,7 @@ import {
15
15
  parseEnvFileEntries,
16
16
  parseEnvIntegrations,
17
17
  shellQuote
18
- } from "./chunk-GLOCISGD.js";
18
+ } from "./chunk-V74YKGXU.js";
19
19
  import {
20
20
  BIND_FAILURE_QUARANTINE_THRESHOLD,
21
21
  INTEGRATIONS_SECTION_END,
@@ -77,7 +77,7 @@ import {
77
77
  sessionTranscriptDir,
78
78
  worseConnectivityOutcome,
79
79
  wrapScheduledTaskPrompt
80
- } from "./chunk-NCIGLRCL.js";
80
+ } from "./chunk-H54FYWAK.js";
81
81
  import {
82
82
  classifyUnanswerablePane,
83
83
  isConsumerTermsDialogVisible,
@@ -7143,7 +7143,7 @@ function exchangeFailureKind(err) {
7143
7143
  }
7144
7144
 
7145
7145
  // src/lib/api-client.ts
7146
- var agtCliVersion = true ? "0.28.1032" : "dev";
7146
+ var agtCliVersion = true ? "0.28.1034" : "dev";
7147
7147
  var lastConfigHash = null;
7148
7148
  function setConfigHash(hash) {
7149
7149
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -12100,4 +12100,4 @@ export {
12100
12100
  managerInstallSystemUnitCommand,
12101
12101
  managerUninstallSystemUnitCommand
12102
12102
  };
12103
- //# sourceMappingURL=chunk-OGITTSBM.js.map
12103
+ //# sourceMappingURL=chunk-6AEWTLG7.js.map
@@ -5066,14 +5066,33 @@ function resolveEffectiveTimezone(taskTimezone, teamTimezone) {
5066
5066
  return teamTimezone.trim();
5067
5067
  return void 0;
5068
5068
  }
5069
- function buildNowBlock(timezone) {
5069
+ function fireTimeLiteral(tz, firedAt) {
5070
+ if (!Number.isFinite(firedAt.getTime()))
5071
+ return "";
5072
+ try {
5073
+ const partsOf = (opts) => Object.fromEntries(new Intl.DateTimeFormat("en-GB", { timeZone: tz, ...opts }).formatToParts(firedAt).map((p2) => [p2.type, p2.value]));
5074
+ const named = partsOf({ weekday: "long", month: "long" });
5075
+ const num = partsOf({ year: "numeric", month: "2-digit", day: "2-digit" });
5076
+ if (!named.weekday || !named.month || !num.year || !num.month || !num.day)
5077
+ return "";
5078
+ const iso = `${num.year}-${num.month}-${num.day}`;
5079
+ return `At fire time (${firedAt.toISOString()}) it was ${named.weekday} ${Number(num.day)} ${named.month} ${num.year} in \`${tz}\` (${iso}).`;
5080
+ } catch {
5081
+ return "";
5082
+ }
5083
+ }
5084
+ function buildNowBlock(timezone, firedAt) {
5070
5085
  if (!timezone || timezone.trim() === "") {
5071
5086
  return "";
5072
5087
  }
5073
5088
  const tz = timezone.trim();
5089
+ const literal = firedAt ? fireTimeLiteral(tz, firedAt) : "";
5074
5090
  return [
5075
5091
  NOW_BLOCK_HEADER,
5076
5092
  `This task's dates are in IANA timezone \`${tz}\`. "Today", "yesterday" and "tomorrow" mean the wall-clock day in \`${tz}\`.`,
5093
+ ...literal ? [
5094
+ `${literal} That is when this run fired, NOT necessarily now: a card worked later may be on a later date. If the date you compute differs from this one, get the weekday the same way (\`TZ=${tz} date +%A\`) rather than working it out.`
5095
+ ] : [],
5077
5096
  `DO NOT TRUST YOUR PROCESS CLOCK TO BE \`${tz}\`. It may or may not be, and you cannot tell which from inside the run. Compute the date in \`${tz}\` EXPLICITLY - for example \`new Date().toLocaleString('en-CA', { timeZone: '${tz}' })\` or \`TZ=${tz} date\` - and use that, whatever \`date\` or \`new Date()\` report on their own.`,
5078
5097
  `When a tool takes \`start\`/\`end\`/\`timeMin\`/\`timeMax\`, give it the instant that corresponds to local midnight in \`${tz}\` - either \`<YYYY-MM-DD>T00:00:00\` with the tool's own tz handling, or the equivalent UTC instant. Never the UTC midnight of the UTC date.`,
5079
5098
  "",
@@ -5117,7 +5136,7 @@ function wrapScheduledTaskPrompt(prompt, options = {}) {
5117
5136
  const conditionalBlock = buildConditionalDeliveryBlock(options.deliveryPolicy);
5118
5137
  const priorBlock = buildPriorRunsBlock(options.priorRuns);
5119
5138
  const afterPreamble = conditionalBlock + priorBlock;
5120
- const nowBlock = buildNowBlock(resolveEffectiveTimezone(options.timezone, options.teamTimezone));
5139
+ const nowBlock = buildNowBlock(resolveEffectiveTimezone(options.timezone, options.teamTimezone), options.firedAt);
5121
5140
  const baseInput = stripNowBlock(prompt);
5122
5141
  const hasPreamble = baseInput.startsWith(PREAMBLE_HEAD);
5123
5142
  let body;
@@ -5132,7 +5151,7 @@ ${baseInput}`;
5132
5151
  return nowBlock + body;
5133
5152
  }
5134
5153
  function buildScheduledTaskContextBlocks(options = {}) {
5135
- const nowBlock = buildNowBlock(resolveEffectiveTimezone(options.timezone, options.teamTimezone));
5154
+ const nowBlock = buildNowBlock(resolveEffectiveTimezone(options.timezone, options.teamTimezone), options.firedAt);
5136
5155
  const priorBlock = buildPriorRunsBlock(options.priorRuns);
5137
5156
  return nowBlock + priorBlock;
5138
5157
  }
@@ -11193,7 +11212,17 @@ var OAUTH_PROVIDERS = {
11193
11212
  // do NOT revert to the broad `accounting.transactions` /
11194
11213
  // `accounting.contacts` scopes, Xero rejects the manifest).
11195
11214
  // The variant *without* `.read` is the read+write granular scope.
11196
- "accounting.settings.read",
11215
+ // settings: write (CS-1829) enables the xero-broker to create and edit
11216
+ // inventory ITEMS on approval. Xero files the Items endpoint under
11217
+ // accounting.settings (per Xero's own OpenAPI spec, XeroAPI/Xero-OpenAPI
11218
+ // xero_accounting.yaml: PUT/POST /Items require `accounting.settings`,
11219
+ // GET accepts `.read`), and there is no narrower items scope. The same
11220
+ // scope also covers accounts, tax rates and tracking categories; the
11221
+ // vendor server's write tools for those stay stripped in broker mode
11222
+ // (XERO_WRITES_VIA_BROKER), so the broker remains the only write path.
11223
+ // An existing install must RECONNECT for its token to carry this, same as
11224
+ // CS-1439's manualjournals.
11225
+ "accounting.settings",
11197
11226
  // contacts: write enables agent-driven supplier/customer creation
11198
11227
  // (required for bill creation since a bill must reference a contact).
11199
11228
  "accounting.contacts",
@@ -15566,4 +15595,4 @@ export {
15566
15595
  peekCurrentSession,
15567
15596
  readDailySessionPin
15568
15597
  };
15569
- //# sourceMappingURL=chunk-NCIGLRCL.js.map
15598
+ //# sourceMappingURL=chunk-H54FYWAK.js.map