Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
## Build and Test

```bash
make build # build
make test # go test ./... -v
go test ./... -cover # with coverage
go vet ./... # lint
make build # build
make test # go test ./... -v
go test ./... -cover # with coverage
go vet ./... # vet checks
golangci-lint run ./... # lint checks (matches CI)
golangci-lint run ./... --fix # auto-fix supported lint issues
```

Binary is always called `a365`. Module is `github.com/sozercan/a365cli`.
Expand Down Expand Up @@ -56,7 +58,8 @@ Adding a new service = new directory in `internal/commands/`, register in `main.
- Use plan mode for architectural changes or new service additions
- Prefer `make build` over `go build`
- Run `go test ./... -count=1` after any code change
- Run `go vet ./...` before committing
- Run `go vet ./...` and `golangci-lint run ./...` before committing
- If lint issues look auto-fixable, try `golangci-lint run ./... --fix` before making manual edits
- When adding a new M365 service, follow the pattern in CONTRIBUTING.md "Adding a New Service"
- For live testing, the default client ID works out of the box — override with `A365_CLIENT_ID` if needed
- Never post messages or modify data during testing without explicit user permission — use `--dry-run`
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ a365 teams list # List your Teams
a365 mail search '?$top=5' # Recent emails
a365 cal list # Upcoming meetings
a365 copilot chat "Summarize my week" # Ask Copilot
a365 copilot agents # List available Copilot agents
a365 copilot chat # Interactive Copilot prompt
a365 me whoami # Your profile
a365 odr ls # OneDrive files
Expand Down Expand Up @@ -106,14 +107,14 @@ CLI flags and env vars always take precedence over config file values.
| [SharePoint Lists](docs/sp-lists.md) | — | 13 | Lists, items, columns |
| [OneDrive](docs/onedrive-remote.md) | `odr` | 12 | Personal OneDrive file management |
| [Me](docs/me.md) | — | 5 | User profiles, org chart |
| [Copilot](docs/copilot.md) | — | 1 | Natural language M365 search with interactive chat |
| [Copilot](docs/copilot.md) | — | 2 | Natural language M365 search with agent-aware chat |
| [Word](docs/word.md) | — | 4 | Documents, comments |
| [Excel](docs/excel.md) | — | 4 | Workbooks, comments |
| [Admin](docs/admin.md) | — | 3 | Users, licenses |
| [Admin365](docs/admin365.md) | — | 14 | Agent policies, Copilot settings |
| [Triggers](docs/triggers.md) | — | 9 | Event-driven automation |
| [WebSearch](docs/websearch.md) | — | 1 | Web search |
| [DASearch](docs/dasearch.md) | — | 1 | Discover Copilot agents |
| [DASearch](docs/dasearch.md) | — | 1 | Low-level Copilot agent discovery (raw DASearch output) |
| [Knowledge](docs/knowledge.md) | — | 5 | Federated knowledge |
| [NLWeb](docs/nlweb.md) | — | 3 | Natural language search |

Expand Down
20 changes: 19 additions & 1 deletion docs/copilot.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,47 @@

Ask natural language questions about all your Microsoft 365 content, including documents, emails, chats, and files. Copilot uses M365 intelligence to find and summarize information across your tenant.

You can also inspect available Copilot agents and target a specific agent when chatting. Web search is enabled by default for `copilot chat`; use `--no-web-search` to send `enableWebSearch=false` to Copilot.

## Commands

| Command | Description | Key Arguments |
|---------|-------------|---------------|
| `copilot chat` | Ask Copilot about your M365 content, or start an interactive prompt | `[message]`, `--conversation-id` |
| `copilot chat` | Ask Copilot about your M365 content, or start an interactive prompt | `[message]`, `--conversation-id`, `--agent`, `--no-web-search` |
| `copilot agents` | List available Copilot agents and their chat selectors | _(none)_ |

## Arguments

- **`[message]`** (optional) -- Natural language question about your M365 content. If omitted and stdin is interactive, `a365` starts a Copilot prompt.
- **`--conversation-id`** (optional) -- Conversation ID for follow-up queries. Use `--output json` when you need to inspect returned conversation IDs.
- **`--agent`** (optional) -- Copilot agent name, selector, or title ID. Resolve available selectors with `a365 copilot agents`.
- **`--no-web-search`** (optional) -- Request Copilot with web search disabled. By default, `copilot chat` sends `enableWebSearch=true`; with `--no-web-search`, `a365` sends `enableWebSearch=false`.

## Behavior note

`--no-web-search` controls the request sent by `a365`, not a strict guarantee about Copilot's final grounding behavior. In live testing, Copilot could still return public/external grounding or citations for some prompts even when `enableWebSearch=false`.

## Examples

```sh
# Ask a simple question
a365 copilot chat "What were the key decisions from last week's project standup?"

# List available Copilot agents and selectors
a365 copilot agents

# Target a specific Copilot agent
a365 copilot chat --agent "Researcher" "Summarize the latest customer escalations"

# Summarize recent emails from a colleague
a365 copilot chat "Summarize recent emails from Alice about the Q3 budget"

# Search across documents
a365 copilot chat "Find the latest sales forecast spreadsheet"

# Ask Copilot with web search disabled
a365 copilot chat --no-web-search "Summarize recent emails from Alice about the Q3 budget"

# Start an interactive Copilot session
a365 copilot chat

Expand Down
11 changes: 8 additions & 3 deletions docs/dasearch.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# DASearch

Declarative Agent search — discover available M365 Copilot agents.
Declarative Agent search — low-level discovery of available M365 Copilot agents.

For the normalized, chat-ready selector view used by `a365 copilot chat --agent`, prefer `a365 copilot agents`. `dasearch agents` remains useful when you want the raw DASearch payload.

## Commands

| Command | Description | Key Arguments |
|---------|-------------|---------------|
| `dasearch agents` | List available M365 Copilot agents | _(none)_ |
| `dasearch agents` | List available M365 Copilot agents from the raw DASearch response | _(none)_ |

## Examples

```bash
# List all available Copilot agents in your tenant
# List the raw DASearch agent payload
a365 dasearch agents

# Prefer this when you want selectors for copilot chat --agent
a365 copilot agents
```
Loading